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 19, 2024
1 parent 3993e39 commit fb8e70b
Show file tree
Hide file tree
Showing 6 changed files with 10 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
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@
"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"
],
"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 fb8e70b

Please sign in to comment.