From 8d03cda91d9bfa5475b69e296b437f36af304e5a Mon Sep 17 00:00:00 2001 From: Aaron Friel Date: Sat, 14 Oct 2017 12:38:43 -0500 Subject: [PATCH 1/6] Build scripts working on Windows. --- app/react/package.json | 4 ++- app/vue/package.json | 5 ++-- yarn.lock | 67 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 3 deletions(-) diff --git a/app/react/package.json b/app/react/package.json index aef8aed6702c..28c6300e05bd 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -18,7 +18,8 @@ "url": "https://github.com/storybooks/storybook.git" }, "scripts": { - "dev": "DEV_BUILD=1 nodemon --watch ./src --exec 'yarn prepare'", + "prepare-root": "cd ../../ && yarn && cd ./app/react", + "dev": "yarn prepare-root && cross-env DEV_BUILD=1 nodemon --watch ./src --exec \"yarn prepare\"", "prepare": "node ../../scripts/prepare.js" }, "dependencies": { @@ -76,6 +77,7 @@ }, "devDependencies": { "babel-cli": "^6.26.0", + "cross-env": "^5.0.5", "nodemon": "^1.12.1", "react": "^16.0.0", "react-dom": "^16.0.0" diff --git a/app/vue/package.json b/app/vue/package.json index 64f810e36042..07df3ed6c565 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -18,7 +18,8 @@ "url": "https://github.com/storybooks/storybook.git" }, "scripts": { - "dev": "DEV_BUILD=1 nodemon --watch ./src --exec 'yarn prepare'", + "prepare-root": "cd ../../ && yarn && cd ./app/vue", + "dev": "yarn prepare-root && cross-env DEV_BUILD=1 nodemon --watch ./src --exec \"yarn prepare\"", "prepare": "node ../../scripts/prepare.js" }, "dependencies": { @@ -77,7 +78,7 @@ }, "devDependencies": { "babel-cli": "^6.26.0", - "nodemon": "^1.12.1", + "nodemon": "^1.12.1" "vue": "^2.5.3", "vue-loader": "^13.4.0", "vue-template-compiler": "^2.5.3" diff --git a/yarn.lock b/yarn.lock index f42617e1cd7d..4c3db1a2f6b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3108,6 +3108,13 @@ cross-env@^3.0.0: cross-spawn "^5.1.0" is-windows "^1.0.0" +cross-env@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.5.tgz#4383d364d9660873dd185b398af3bfef5efffef3" + dependencies: + cross-spawn "^5.1.0" + is-windows "^1.0.0" + cross-spawn@5.1.0, cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -12057,9 +12064,69 @@ webpack-sources@^1.0.1: source-list-map "^2.0.0" source-map "~0.5.3" +<<<<<<< refs/remotes/upstream/master webpack@3.8.1, webpack@^3.6.0, webpack@^3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.8.1.tgz#b16968a81100abe61608b0153c9159ef8bb2bd83" +======= +webpack@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.5.1.tgz#b749ee3d2b5a118dad53e8e41585b3f71e75499a" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^5.1.5" + ajv-keywords "^2.0.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + +webpack@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.6.0.tgz#a89a929fbee205d35a4fa2cc487be9cbec8898bc" + dependencies: + acorn "^5.0.0" + acorn-dynamic-import "^2.0.0" + ajv "^5.1.5" + ajv-keywords "^2.0.0" + async "^2.1.2" + enhanced-resolve "^3.4.0" + escope "^3.6.0" + interpret "^1.0.0" + json-loader "^0.5.4" + json5 "^0.5.1" + loader-runner "^2.3.0" + loader-utils "^1.1.0" + memory-fs "~0.4.1" + mkdirp "~0.5.0" + node-libs-browser "^2.0.0" + source-map "^0.5.3" + supports-color "^4.2.1" + tapable "^0.2.7" + uglifyjs-webpack-plugin "^0.4.6" + watchpack "^1.4.0" + webpack-sources "^1.0.1" + yargs "^8.0.2" + +webpack@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.7.1.tgz#6046b5c415ff7df7a0dc54c5b6b86098e8b952da" +>>>>>>> Build scripts working on Windows. dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0" From 571503944671ab880568d7ba785b922ac364a6ba Mon Sep 17 00:00:00 2001 From: Aaron Friel Date: Tue, 24 Oct 2017 13:31:13 -0500 Subject: [PATCH 2/6] Run bootstrap script with node. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eb16f8c51ee4..85ef8a297dde 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "examples/vue-kitchen-sink" ], "scripts": { - "bootstrap": "./scripts/bootstrap.js", + "bootstrap": "node ./scripts/bootstrap.js", "bootstrap:docs": "yarn install --cwd docs", "bootstrap:react-native-vanilla": "npm --prefix examples/react-native-vanilla install", "bootstrap:crna-kitchen-sink": "npm --prefix examples/crna-kitchen-sink install", From ccd20f12948012a2e2d1e19ae4bb0fa1be4e8802 Mon Sep 17 00:00:00 2001 From: AaronFriel Date: Mon, 6 Nov 2017 14:37:16 -0600 Subject: [PATCH 3/6] Add cross-env as root devdep, remove unnecessary script. --- addons/comments/package.json | 2 +- app/react/package.json | 4 +--- app/vue/package.json | 3 +-- examples/vue-kitchen-sink/package.json | 2 +- package.json | 1 + yarn.lock | 7 +++++++ 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/addons/comments/package.json b/addons/comments/package.json index 57c22ee63e25..534fc265e85c 100644 --- a/addons/comments/package.json +++ b/addons/comments/package.json @@ -19,7 +19,7 @@ "prepare": "node ../../scripts/prepare.js", "publish-storybook": "bash .scripts/publish_storybook.sh", "storybook": "start-storybook -p 3006", - "storybook-local": "STORYBOOK_CLOUD_SERVER='http://localhost:3003/graphql' start-storybook -p 9010", + "storybook-local": "cross-env STORYBOOK_CLOUD_SERVER='http://localhost:3003/graphql' start-storybook -p 9010", "storybook-remote": "start-storybook -p 3006" }, "dependencies": { diff --git a/app/react/package.json b/app/react/package.json index 28c6300e05bd..97429a97f75a 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -18,8 +18,7 @@ "url": "https://github.com/storybooks/storybook.git" }, "scripts": { - "prepare-root": "cd ../../ && yarn && cd ./app/react", - "dev": "yarn prepare-root && cross-env DEV_BUILD=1 nodemon --watch ./src --exec \"yarn prepare\"", + "dev": "cross-env DEV_BUILD=1 nodemon --watch ./src --exec \"yarn prepare\"", "prepare": "node ../../scripts/prepare.js" }, "dependencies": { @@ -77,7 +76,6 @@ }, "devDependencies": { "babel-cli": "^6.26.0", - "cross-env": "^5.0.5", "nodemon": "^1.12.1", "react": "^16.0.0", "react-dom": "^16.0.0" diff --git a/app/vue/package.json b/app/vue/package.json index 07df3ed6c565..9b597f0f37c1 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -18,8 +18,7 @@ "url": "https://github.com/storybooks/storybook.git" }, "scripts": { - "prepare-root": "cd ../../ && yarn && cd ./app/vue", - "dev": "yarn prepare-root && cross-env DEV_BUILD=1 nodemon --watch ./src --exec \"yarn prepare\"", + "dev": "cross-env DEV_BUILD=1 nodemon --watch ./src --exec \"yarn prepare\"", "prepare": "node ../../scripts/prepare.js" }, "dependencies": { diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index d48fbb67f0b9..6909799bd01c 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -14,7 +14,7 @@ "babel-loader": "^7.1.2", "babel-preset-env": "^1.6.0", "babel-preset-vue": "^1.2.1", - "cross-env": "^3.0.0", + "cross-env": "^5.1.1", "css-loader": "^0.28.7", "file-loader": "^1.1.5", "vue-hot-reload-api": "^2.2.0", diff --git a/package.json b/package.json index 85ef8a297dde..609cea1183ef 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "chalk": "^2.3.0", "codecov": "^3.0.0", "commander": "^2.11.0", + "cross-env": "^5.1.1", "danger": "^2.0.0", "enzyme": "^3.1.1", "enzyme-adapter-react-16": "^1.0.4", diff --git a/yarn.lock b/yarn.lock index 4c3db1a2f6b8..fb48b9152347 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3115,6 +3115,13 @@ cross-env@^5.0.5: cross-spawn "^5.1.0" is-windows "^1.0.0" +cross-env@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.1.1.tgz#b6d8ab97f304c0f71dae7277b75fe424c08dfa74" + dependencies: + cross-spawn "^5.1.0" + is-windows "^1.0.0" + cross-spawn@5.1.0, cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" From db5288c6d9adc66442643d5a1e583d77b3743203 Mon Sep 17 00:00:00 2001 From: AaronFriel Date: Mon, 6 Nov 2017 16:23:53 -0600 Subject: [PATCH 4/6] Run test script with node. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 609cea1183ef..4675823bb031 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "lint:js": "eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.json", "lint:md": "remark", "publish": "lerna publish", - "test": "./scripts/test.js", + "test": "node ./scripts/test.js", "repo-dirty-check": "node ./scripts/repo-dirty-check" }, "devDependencies": { From b893e3b2dc4497f70eb445a4eb4182f5364e982e Mon Sep 17 00:00:00 2001 From: AaronFriel Date: Mon, 6 Nov 2017 16:33:57 -0600 Subject: [PATCH 5/6] Fix package.json in app/vue --- app/vue/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vue/package.json b/app/vue/package.json index 9b597f0f37c1..b91af7afb287 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -77,7 +77,7 @@ }, "devDependencies": { "babel-cli": "^6.26.0", - "nodemon": "^1.12.1" + "nodemon": "^1.12.1", "vue": "^2.5.3", "vue-loader": "^13.4.0", "vue-template-compiler": "^2.5.3" From c9f59888611208873b839fd553f91361c491e19b Mon Sep 17 00:00:00 2001 From: AaronFriel Date: Mon, 6 Nov 2017 16:55:07 -0600 Subject: [PATCH 6/6] Update yarn.lock. --- yarn.lock | 49 +------------------------------------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/yarn.lock b/yarn.lock index 384dd31c4e30..8d4c9152054c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3096,20 +3096,6 @@ create-react-class@^15.5.2: loose-envify "^1.3.1" object-assign "^4.1.1" -cross-env@^3.0.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-3.2.4.tgz#9e0585f277864ed421ce756f81a980ff0d698aba" - dependencies: - cross-spawn "^5.1.0" - is-windows "^1.0.0" - -cross-env@^5.0.5: - version "5.0.5" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.5.tgz#4383d364d9660873dd185b398af3bfef5efffef3" - dependencies: - cross-spawn "^5.1.0" - is-windows "^1.0.0" - cross-env@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.1.1.tgz#b6d8ab97f304c0f71dae7277b75fe424c08dfa74" @@ -12066,14 +12052,9 @@ webpack-sources@^1.0.1: source-list-map "^2.0.0" source-map "~0.5.3" -<<<<<<< refs/remotes/upstream/master -webpack@3.8.1, webpack@^3.6.0, webpack@^3.8.1: +webpack@3.8.1, webpack@^3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.8.1.tgz#b16968a81100abe61608b0153c9159ef8bb2bd83" -======= -webpack@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.5.1.tgz#b749ee3d2b5a118dad53e8e41585b3f71e75499a" dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0" @@ -12125,34 +12106,6 @@ webpack@^3.6.0: webpack-sources "^1.0.1" yargs "^8.0.2" -webpack@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.7.1.tgz#6046b5c415ff7df7a0dc54c5b6b86098e8b952da" ->>>>>>> Build scripts working on Windows. - dependencies: - acorn "^5.0.0" - acorn-dynamic-import "^2.0.0" - ajv "^5.1.5" - ajv-keywords "^2.0.0" - async "^2.1.2" - enhanced-resolve "^3.4.0" - escope "^3.6.0" - interpret "^1.0.0" - json-loader "^0.5.4" - json5 "^0.5.1" - loader-runner "^2.3.0" - loader-utils "^1.1.0" - memory-fs "~0.4.1" - mkdirp "~0.5.0" - node-libs-browser "^2.0.0" - source-map "^0.5.3" - supports-color "^4.2.1" - tapable "^0.2.7" - uglifyjs-webpack-plugin "^0.4.6" - watchpack "^1.4.0" - webpack-sources "^1.0.1" - yargs "^8.0.2" - websocket-driver@>=0.5.1: version "0.7.0" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb"