Skip to content

Commit

Permalink
chore(repo): add build:watch using rollup
Browse files Browse the repository at this point in the history
HuiSF committed Jan 31, 2024
1 parent 8b3b204 commit dd497d0
Showing 21 changed files with 26 additions and 42 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -17,9 +17,7 @@
"test:tsc-compliance": "yarn workspace tsc-compliance-test test:compliance",
"docs": "typedoc packages/**/src --name amplify-js --hideGenerator --excludePrivate --ignoreCompilerErrors --mode file --out docs/api --theme docs/amplify-theme/typedoc/ --readme README.md",
"build": "lerna run build --stream && yarn test:duplicates",
"build:watch": "concurrently 'lerna run build:cjs:watch --parallel' 'lerna run build:esm:watch --parallel' --raw",
"build:esm:watch": "lerna run build:esm:watch --parallel",
"build:cjs:watch": "lerna run build:cjs:watch --parallel",
"build:watch": "concurrently 'lerna run build:watch --parallel' --raw",
"build:client-types": "cd scripts/dts-bundler && yarn && yarn run build",
"clean": "lerna run clean --parallel",
"clean:size": "lerna run clean:size --parallel",
@@ -97,6 +95,7 @@
"json-loader": "^0.5.7",
"lerna": "^7.4.2",
"license-check-and-add": "^4.0.5",
"mkdirp": "^3.0.1",
"prettier": "^3.1.0",
"rimraf": "^2.6.2",
"rollup": "^4.9.6",
4 changes: 1 addition & 3 deletions packages/adapter-nextjs/package.json
Original file line number Diff line number Diff line change
@@ -60,9 +60,7 @@
"build": "npm run clean && npm run build:esm-cjs",
"build-with-test": "npm test && npm run build",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:esm-cjs:watch": "npm run build:esm-cjs -- --watch",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"clean": "npm run clean:size && rimraf dist",
"clean:size": "rimraf dual-publish-tmp tmp*",
"format": "echo \"Not implemented\"",
3 changes: 1 addition & 2 deletions packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -16,8 +16,7 @@
"build-with-test": "npm run clean && npm run test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/api-graphql/package.json
Original file line number Diff line number Diff line change
@@ -19,8 +19,7 @@
"build-with-test": "npm test && npm build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/api-rest/package.json
Original file line number Diff line number Diff line change
@@ -16,8 +16,7 @@
"build-with-test": "npm test && npm build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -18,8 +18,7 @@
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -20,8 +20,7 @@
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf lib-esm lib dist",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/aws-amplify/package.json
Original file line number Diff line number Diff line change
@@ -240,8 +240,7 @@
"build-with-test": "npm run clean && npm test && tsc && webpack -p",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m es6 --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "rimraf lib-esm lib dist",
"format": "echo \"Not implemented\"",
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -21,8 +21,7 @@
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run generate-version && npm run build:esm-cjs && npm run build:umd",
"generate-version": "genversion src/Platform/version.ts --es6 --semi --source ../aws-amplify",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
3 changes: 1 addition & 2 deletions packages/datastore-storage-adapter/package.json
Original file line number Diff line number Diff line change
@@ -14,8 +14,7 @@
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "rimraf dist lib lib-esm",
"format": "echo \"Not implemented\"",
3 changes: 1 addition & 2 deletions packages/datastore/package.json
Original file line number Diff line number Diff line change
@@ -19,8 +19,7 @@
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/geo/package.json
Original file line number Diff line number Diff line change
@@ -19,8 +19,7 @@
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/interactions/package.json
Original file line number Diff line number Diff line change
@@ -16,8 +16,7 @@
"build-with-test": "npm run clean && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/notifications/package.json
Original file line number Diff line number Diff line change
@@ -16,8 +16,7 @@
"build-with-test": "npm run clean && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/predictions/package.json
Original file line number Diff line number Diff line change
@@ -16,8 +16,7 @@
"build-with-test": "npm run clean && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/pubsub/package.json
Original file line number Diff line number Diff line change
@@ -16,8 +16,7 @@
"build-with-test": "npm run clean && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs && cp -R src/vendor dist/cjs/vendor && cp -R src/vendor dist/esm/vendor",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "mkdirp dist/esm/vendor && mkdirp dist/cjs/vendor && cp -R src/vendor dist/cjs/vendor && cp -R src/vendor dist/esm/vendor && rollup -c rollup.config.mjs --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf dist lib lib-esm",
"clean:size": "rimraf dual-publish-tmp tmp*",
3 changes: 1 addition & 2 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
@@ -15,8 +15,7 @@
"test:android": "./android/gradlew test -p ./android",
"build-with-test": "npm run clean && npm test && tsc",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs",
"clean": "rimraf lib-esm lib dist",
"format": "echo \"Not implemented\"",
3 changes: 1 addition & 2 deletions packages/rtn-push-notification/package.json
Original file line number Diff line number Diff line change
@@ -15,8 +15,7 @@
"test:android": "./android/gradlew test -p ./android",
"build-with-test": "npm run clean && npm test && tsc",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs",
"clean": "rimraf lib-esm lib dist",
"format": "echo \"Not implemented\"",
3 changes: 1 addition & 2 deletions packages/rtn-web-browser/package.json
Original file line number Diff line number Diff line change
@@ -15,8 +15,7 @@
"test:android": "./android/gradlew test -p ./android",
"build-with-test": "npm run clean && npm test && tsc",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs",
"clean": "rimraf dist lib lib-esm",
"format": "echo \"Not implemented\"",
3 changes: 1 addition & 2 deletions packages/storage/package.json
Original file line number Diff line number Diff line change
@@ -26,8 +26,7 @@
"build-with-test": "npm test && npm run build",
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
"build:esm-cjs": "rollup -c rollup.config.mjs",
"build:cjs:watch": "rimraf dist/cjs && tsc -p tsconfig.watch.json -m commonjs --outDir dist/cjs --watch",
"build:esm:watch": "rimraf dist/esm && tsc -p tsconfig.watch.json -m esnext --outDir dist/esm --watch",
"build:watch": "npm run build:esm-cjs -- --watch",
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
"clean": "npm run clean:size && rimraf lib-esm lib dist",
"clean:size": "rimraf dual-publish-tmp tmp*",
5 changes: 5 additions & 0 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dd497d0

Please sign in to comment.