diff --git a/.eslintrc b/.eslintrc index dfea96d..72e0df1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -34,5 +34,5 @@ } } ], - "ignorePatterns": ["dist"] + "ignorePatterns": ["lib"] } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2fb7d8..d04c759 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,3 +16,5 @@ jobs: release: uses: cloudscape-design/actions/.github/workflows/release.yml@main secrets: inherit + with: + publish-packages: lib diff --git a/.gitignore b/.gitignore index 31da342..2efed1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ build -dist +lib node_modules /index.css coverage diff --git a/package.json b/package.json index 3fc149d..89aa668 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/postcss.js b/postcss.js index 595ed56..afa3743 100644 --- a/postcss.js +++ b/postcss.js @@ -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); diff --git a/tsconfig.json b/tsconfig.json index 9077864..aa1cca0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,7 @@ "moduleResolution": "Node", "strict": true, "declaration": true, - "outDir": "dist" + "outDir": "lib" }, "include": ["src/**/*.ts"], "exclude": ["**/__tests__/**"]