Skip to content

Commit

Permalink
chore: Refactor to publish to lib folder
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldowseza committed Mar 7, 2024
1 parent 82fb607 commit f198ce1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
}
}
],
"ignorePatterns": ["dist"]
"ignorePatterns": ["lib"]
}
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ jobs:
release:
uses: cloudscape-design/actions/.github/workflows/release.yml@main
secrets: inherit
with:
publish-packages: lib
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build
dist
lib
node_modules
/index.css
coverage
Expand Down
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@
"homepage": "https://cloudscape.design",
"license": "Apache-2.0",
"type": "module",
"main": "./dist/index.js",
"main": "./index.js",
"exports": {
".": "./dist/index.js",
".": "./index.js",
"./dark-mode-utils.css": "./dark-mode-utils.css",
"./index.css": "./index.css"
},
"files": [
"dist",
"index.css",
"dark-mode-utils.css",
"THIRD_PARTY_LICENSES.txt"
],
"files": [],
"scripts": {
"prepare": "husky",
"prebuild": "rm -rf lib && mkdir lib",
"build": "node postcss.js && tsc",
"postbuild": "cp dark-mode-utils.css package.json THIRD-PARTY-LICENSES.txt LICENSE README.md lib",
"lint": "eslint .",
"test": "jest --coverage"
},
Expand Down
2 changes: 1 addition & 1 deletion postcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import postcssUrl from 'postcss-url';
import postcssImport from 'postcss-import';

const input = 'src/index.css';
const output = 'index.css';
const output = 'lib/index.css';

async function convert() {
const css = fs.readFileSync(input);
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"moduleResolution": "Node",
"strict": true,
"declaration": true,
"outDir": "dist"
"outDir": "lib"
},
"include": ["src/**/*.ts"],
"exclude": ["**/__tests__/**"]
Expand Down

0 comments on commit f198ce1

Please sign in to comment.