Skip to content

Commit

Permalink
chore: Remove legacy generate-package script (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldowseza authored Sep 26, 2024
1 parent cca755b commit e511c42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 37 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@cloudscape-design/test-utils-monorepo",
"version": "1.0.0",
"license": "Apache-2.0",
"files": [],
"repository": {
"type": "git",
Expand All @@ -10,7 +11,7 @@
"scripts": {
"lint": "eslint --ignore-path .gitignore --ext js,ts .",
"build": "tsc -b && node scripts/generate-package.js && node scripts/generate-doc.js && node scripts/generate-exports.js",
"postbuild": "node scripts/generate-build.js",
"postbuild": "cp NOTICE README.md LICENSE lib/core && cp NOTICE README.md LICENSE lib/converter",
"test": "vitest run",
"posttest": "node ./scripts/verify-typescript.js",
"prepare": "husky install"
Expand Down
32 changes: 0 additions & 32 deletions scripts/generate-build.js

This file was deleted.

9 changes: 5 additions & 4 deletions scripts/generate-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ const packages = [
manifest: {
name: '@cloudscape-design/test-utils-converter',
main: './dist/index.js',
files: ['dist'],
files: ['dist', 'NOTICE', 'LICENSE', 'README.md'],
},
packageRoot: path.join(root, './lib/converter'),
dependencies: ['@babel/core', '@babel/plugin-syntax-decorators', '@babel/plugin-syntax-typescript', 'glob'],
},
{
manifest: {
name: '@cloudscape-design/test-utils-core',
files: ['test-utils-doc', 'dist', '*.js', '*.d.ts'],
files: ['test-utils-doc', 'dist', '*.js', '*.d.ts', 'NOTICE', 'LICENSE', 'README.md'],
},
packageRoot: path.join(root, './lib/core'),
dependencies: ['css-selector-tokenizer', 'css.escape'],
Expand All @@ -35,10 +35,11 @@ packages.forEach(package => {

const pkg = {
version,
license: originalContent.license,
homepage: originalContent.homepage,
repository: originalContent.repository,
...manifest,
dependencies: pickDependenciesWithVersions(dependencies, originalContent.dependencies),
repository: originalContent.repository,
homepage: originalContent.homepage,
};
fs.writeFileSync(path.join(packageRoot, './package.json'), JSON.stringify(pkg, null, 2));
});
Expand Down

0 comments on commit e511c42

Please sign in to comment.