Skip to content

Commit

Permalink
chore: cleanup package json scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
emmenko committed Nov 15, 2020
1 parent 28f1de5 commit e845700
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 253 deletions.
6 changes: 0 additions & 6 deletions packages-backend/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@
},
"main": "dist/express.cjs.js",
"module": "dist/express.esm.js",
"typings": "./build/index.d.ts",
"types": "./build/index.d.ts",
"files": ["dist", "package.json", "LICENSE", "README.md"],
"scripts": {
"prebuild": "rimraf build/**",
"build": "tsc -p tsconfig.build.json"
},
"dependencies": {
"@babel/runtime": "7.12.5",
"@babel/runtime-corejs3": "7.12.5",
Expand Down
6 changes: 0 additions & 6 deletions packages-backend/loggers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@
},
"main": "dist/loggers.cjs.js",
"module": "dist/loggers.esm.js",
"typings": "./build/index.d.ts",
"types": "./build/index.d.ts",
"files": ["dist", "package.json", "LICENSE", "README.md"],
"scripts": {
"prebuild": "rimraf build/**",
"build": "tsc -p tsconfig.build.json"
},
"dependencies": {
"@babel/runtime": "7.12.5",
"@babel/runtime-corejs3": "7.12.5",
Expand Down
9 changes: 1 addition & 8 deletions packages/actions-global/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,9 @@
},
"main": "dist/actions-global.cjs.js",
"module": "dist/actions-global.esm.js",
"typings": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.ts",
"files": ["dist", "package.json", "LICENSE", "README.md"],
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf dist/**",
"build": "yarn build:bundles && yarn build:typings",
"build:bundles": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -i ./src/index.ts",
"build:bundles:watch": "yarn build:bundles -w",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings"
"prepare": "./../../scripts/version.js replace"
},
"dependencies": {
"@babel/runtime": "7.12.5",
Expand Down
9 changes: 1 addition & 8 deletions packages/application-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
},
"main": "dist/application-components.cjs.js",
"module": "dist/application-components.esm.js",
"typings": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.ts",
"files": [
"dist",
"materials/media-queries.css",
Expand All @@ -27,12 +25,7 @@
"README.md"
],
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf dist/**",
"build": "yarn build:bundles && yarn build:typings",
"build:bundles": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -i ./src/index.ts",
"build:bundles:watch": "yarn build:bundles -w",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings"
"prepare": "./../../scripts/version.js replace"
},
"dependencies": {
"@babel/runtime": "7.12.5",
Expand Down
26 changes: 4 additions & 22 deletions packages/application-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,19 @@
"directory": "packages/application-config"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": [
"javascript",
"frontend",
"react",
"toolkit",
"config"
],
"keywords": ["javascript", "frontend", "react", "toolkit", "config"],
"license": "MIT",
"private": false,
"publishConfig": {
"access": "public"
},
"main": "dist/application-config.cjs.js",
"module": "dist/application-config.esm.js",
"typings": "./build/typings/src/index.d.ts",
"types": "./build/typings/src/index.d.ts",
"files": [
"dist",
"schema.json",
"package.json",
"LICENSE",
"README.md"
],
"files": ["dist", "schema.json", "package.json", "LICENSE", "README.md"],
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf build/**",
"build": "yarn build:schema && yarn build:bundles && yarn build:typings",
"build:schema": "json2ts schema.json src/schema.ts --style.singleQuote --bannerComment '/* eslint-disable prettier/prettier */\n// This file was automatically generated by json-schema-to-typescript.\n// DO NOT MODIFY IT BY HAND. Instead, modify the source schema.json file.'",
"build:bundles": "babel src --out-dir build --extensions .ts --ignore src/types.ts,src/schema.ts",
"build:bundles:watch": "yarn build:bundles -w",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir build/typings"
"prebuild": "yarn build:schema",
"build:schema": "json2ts schema.json src/schema.ts --style.singleQuote --bannerComment '/* eslint-disable prettier/prettier */\n// This file was automatically generated by json-schema-to-typescript.\n// DO NOT MODIFY IT BY HAND. Instead, modify the source schema.json file.'"
},
"dependencies": {
"@babel/runtime": "7.12.5",
Expand Down
11 changes: 1 addition & 10 deletions packages/application-shell-connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,12 @@
},
"main": "dist/application-shell-connectors.cjs.js",
"module": "dist/application-shell-connectors.esm.js",
"typings": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.ts",
"files": ["dist", "test-utils", "package.json", "LICENSE", "README.md"],
"preconstruct": {
"entrypoints": [".", "test-utils"]
},
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf dist/** test-utils/**",
"build": "yarn build:bundles && yarn build:test-utils && yarn build:typings",
"build:bundles": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -i ./src/index.ts",
"build:bundles:watch": "yarn build:bundles -w",
"build:test-utils": "cross-env NODE_ENV=development rollup -c ../../rollup.config.js -i ./src/test-utils/index.ts",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings",
"postbuild:typings": "echo \"export * from '../dist/typings/test-utils';\" > test-utils/index.d.ts"
"prepare": "./../../scripts/version.js replace"
},
"dependencies": {
"@babel/runtime": "7.12.5",
Expand Down
11 changes: 1 addition & 10 deletions packages/application-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,12 @@
},
"main": "dist/application-shell.cjs.js",
"module": "dist/application-shell.esm.js",
"typings": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.ts",
"files": ["dist", "test-utils", "package.json", "LICENSE", "README.md"],
"preconstruct": {
"entrypoints": [".", "test-utils"]
},
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf dist/** test-utils/**",
"build": "yarn build:bundles && yarn build:test-utils && yarn build:typings",
"build:bundles": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -i ./src/index.ts -d dist",
"build:bundles:watch": "yarn build:bundles -w",
"build:test-utils": "cross-env NODE_ENV=development rollup -c ../../rollup.config.js -i ./src/test-utils/index.ts",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings",
"postbuild:typings": "echo \"export * from '../dist/typings/test-utils';\" > test-utils/index.d.ts"
"prepare": "./../../scripts/version.js replace"
},
"dependencies": {
"@babel/runtime": "7.12.5",
Expand Down
23 changes: 3 additions & 20 deletions packages/browser-history/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,17 @@
"directory": "packages/browser-history"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": [
"javascript",
"frontend",
"react",
"toolkit"
],
"keywords": ["javascript", "frontend", "react", "toolkit"],
"license": "MIT",
"private": false,
"publishConfig": {
"access": "public"
},
"main": "dist/browser-history.cjs.js",
"module": "dist/browser-history.esm.js",
"typings": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.ts",
"files": [
"dist",
"package.json",
"LICENSE",
"README.md"
],
"files": ["dist", "package.json", "LICENSE", "README.md"],
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf dist/**",
"build": "yarn build:bundles && yarn build:typings",
"build:bundles": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -i ./src/index.ts",
"build:bundles:watch": "yarn build:bundles -w",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings"
"prepare": "./../../scripts/version.js replace"
},
"dependencies": {
"@babel/runtime": "7.12.5",
Expand Down
23 changes: 3 additions & 20 deletions packages/constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,17 @@
"directory": "packages/constants"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": [
"javascript",
"frontend",
"react",
"toolkit"
],
"keywords": ["javascript", "frontend", "react", "toolkit"],
"license": "MIT",
"private": false,
"publishConfig": {
"access": "public"
},
"main": "dist/constants.cjs.js",
"module": "dist/constants.esm.js",
"typings": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.ts",
"files": [
"dist",
"package.json",
"LICENSE",
"README.md"
],
"files": ["dist", "package.json", "LICENSE", "README.md"],
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf dist/**",
"build": "yarn build:bundles && yarn build:typings",
"build:bundles": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -i ./src/index.ts",
"build:bundles:watch": "yarn build:bundles -w",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings"
"prepare": "./../../scripts/version.js replace"
},
"dependencies": {
"@babel/runtime": "7.12.5",
Expand Down
8 changes: 1 addition & 7 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
},
"main": "dist/i18n.cjs.js",
"module": "dist/i18n.esm.js",
"typings": "./dist/typings/src/index.d.ts",
"types": "./dist/typings/src/index.d.ts",
"files": [
"compiled-data",
"dist",
Expand All @@ -33,11 +31,7 @@
],
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf dist/** && yarn compile-data",
"build": "yarn build:bundles && yarn build:typings",
"build:bundles": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -i ./src/index.ts --dir dist",
"build:bundles:watch": "yarn build:bundles -w",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings",
"prebuild": "yarn compile-data",
"compile-data": "formatjs compile-folder --format=$(pwd)/transifex-transformer.js --ast data compiled-data"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-stylelint-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"publishConfig": {
"access": "public"
},
"files": ["package.json", "dist", "LICENSE", "README.md"],
"files": ["dist", "package.json", "LICENSE", "README.md"],
"main": "index.js",
"module": "index.js",
"peerDependencies": {
Expand Down
7 changes: 0 additions & 7 deletions packages/l10n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,9 @@
},
"main": "dist/l10n.cjs.js",
"module": "dist/l10n.esm.js",
"typings": "./dist/typings/src/index.d.ts",
"types": "./dist/typings/src/index.d.ts",
"files": ["data", "dist", "package.json", "LICENSE", "README.md"],
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "rimraf dist/**",
"build": "yarn build:bundles && yarn build:typings",
"build:bundles": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js -i ./src/index.ts -d dist",
"build:bundles:watch": "yarn build:bundles -w",
"build:typings": "cross-env tsc -p tsconfig.declarations.json --emitDeclarationOnly --declarationDir dist/typings",
"generate-data": "node ./scripts/generate-l10n-data.js"
},
"dependencies": {
Expand Down
12 changes: 1 addition & 11 deletions packages/mc-html-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
"directory": "packages/mc-html-template"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": [
"javascript",
"frontend",
"react",
"toolkit"
],
"keywords": ["javascript", "frontend", "react", "toolkit"],
"license": "MIT",
"private": false,
"publishConfig": {
Expand All @@ -30,11 +25,6 @@
"LICENSE",
"README.md"
],
"scripts": {
"prebuild": "rimraf build/**",
"build": "babel src --out-dir build",
"build:bundles:watch": "yarn build -w"
},
"dependencies": {
"@babel/runtime": "7.12.5",
"@babel/runtime-corejs3": "7.12.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// For backwards compatibilty
module.exports = require('../build/config/create-webpack-config-for-development');
const { createWebpackConfigForDevelopment } = require('../dist/mc-scripts.cjs');
module.exports = createWebpackConfigForDevelopment;
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// For backwards compatibilty
module.exports = require('../build/config/create-webpack-config-for-production');
const { createWebpackConfigForProduction } = require('../dist/mc-scripts.cjs');
module.exports = createWebpackConfigForProduction;
3 changes: 2 additions & 1 deletion packages/mc-scripts/config/vendors-to-transpile.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// For backwards compatibilty
module.exports = require('../build/config/vendors-to-transpile');
const { vendorsToCompile } = require('../dist/mc-scripts.cjs');
module.exports = vendorsToCompile;
32 changes: 4 additions & 28 deletions packages/mc-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,20 @@
"directory": "packages/mc-scripts"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": [
"javascript",
"frontend",
"react",
"toolkit"
],
"keywords": ["javascript", "frontend", "react", "toolkit"],
"license": "MIT",
"private": false,
"publishConfig": {
"access": "public"
},
"main": "dist/mc-scripts.cjs.js",
"files": [
"bin",
"dist",
"config",
"package.json",
"LICENSE",
"README.md"
],
"files": ["bin", "dist", "config", "package.json", "LICENSE", "README.md"],
"bin": {
"mc-scripts": "./bin/mc-scripts.js"
},
"scripts": {
"prebuild": "rimraf build/**",
"build": "babel src --out-dir build",
"build:bundles:watch": "yarn build -w"
},
"browserslist": {
"production": [
">1%",
"not op_mini all",
"not dead"
],
"development": [
"last 2 firefox versions",
"last 2 chrome versions"
]
"production": [">1%", "not op_mini all", "not dead"],
"development": ["last 2 firefox versions", "last 2 chrome versions"]
},
"dependencies": {
"@babel/runtime": "7.12.5",
Expand Down
Loading

0 comments on commit e845700

Please sign in to comment.