Pārlūkot izejas kodu

Some Windows support (#2211)

* build: explicitly use `sh` for shell scripts

* build: fix css path check on windows

* build: use NODE_PATH instead of symlink for local package resolution in e2e tests

* build: actually with new lerna we do not need NODE_PATH

* build: sh → bash
Renée Kooi 5 gadi atpakaļ
vecāks
revīzija
9513d1c0b1
3 mainītis faili ar 8 papildinājumiem un 13 dzēšanām
  1. 3 3
      bin/build-css.js
  2. 0 5
      bin/endtoend-build
  3. 5 5
      package.json

+ 3 - 3
bin/build-css.js

@@ -54,11 +54,11 @@ async function compileCSS () {
     // Save the `uppy` package's CSS as `uppy.css`,
     // `@uppy/robodog` as `robodog.css`,
     // the rest as `style.css`.
-    // const outfile = path.join(outdir, outdir.includes('packages/uppy/') ? 'uppy.css' : 'style.css')
+    // const outfile = path.join(outdir, outdir.includes(path.normalize('packages/uppy/')) ? 'uppy.css' : 'style.css')
     let outfile = path.join(outdir, 'style.css')
-    if (outdir.includes('packages/uppy/')) {
+    if (outdir.includes(path.normalize('packages/uppy/'))) {
       outfile = path.join(outdir, 'uppy.css')
-    } else if (outdir.includes('packages/@uppy/robodog/')) {
+    } else if (outdir.includes(path.normalize('packages/@uppy/robodog/'))) {
       outfile = path.join(outdir, 'robodog.css')
     }
     await mkdirp(outdir)

+ 0 - 5
bin/endtoend-build

@@ -16,9 +16,4 @@ rm -rf "${__root}/test/endtoend/node_modules"
 
 npm run build
 
-# Allow integration tests to resolve @uppy packages
-ln -s "${__root}/packages" "${__root}/test/endtoend/node_modules"
-
 bash "${__dir}/endtoend-build-tests"
-
-rm "${__root}/test/endtoend/node_modules"

+ 5 - 5
package.json

@@ -216,13 +216,13 @@
     "lint:markdown": "remark -f -q . -i .gitignore",
     "lint:staged": "lint-staged",
     "lint": "eslint . --cache",
-    "release": "./bin/release",
+    "release": "bash ./bin/release",
     "size": "echo 'JS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.js | gzip | wc -c && echo 'CSS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.css | gzip | wc -c",
-    "start:companion": "./bin/companion",
+    "start:companion": "bash ./bin/companion",
     "start": "npm-run-all --parallel watch start:companion web:start",
     "test:companion": "cd ./packages/@uppy/companion && npm run test",
-    "test:endtoend:build-ci": "./bin/endtoend-build-ci",
-    "test:endtoend:build": "./bin/endtoend-build",
+    "test:endtoend:build-ci": "bash ./bin/endtoend-build-ci",
+    "test:endtoend:build": "bash ./bin/endtoend-build",
     "test:endtoend:local": "npm run test:endtoend:build && wdio test/endtoend/wdio.local.conf.js",
     "test:endtoend:providers": "npm run test:endtoend:build && . ./test/endtoend/providers/env.sh && wdio test/endtoend/wdio.local.conf.js --spec test/endtoend/providers/provider.*.test.js",
     "test:endtoend:prepare-ci": "npm-run-all --parallel --race test:endtoend:registry test:endtoend:build-ci",
@@ -244,7 +244,7 @@
     "web:build": "npm-run-all web:inject-bundles-misc web:generate web:build-examples web:inject-frontpagecodesample",
     "web:bundle-watch-inject": "onchange 'packages/uppy/dist/**/*.css' 'packages/uppy/dist/**/*.js' --initial --verbose -- npm run web:inject-bundles-misc",
     "web:clean": "cd website && touch db.json && ./node_modules/.bin/hexo clean",
-    "web:deploy": "npm-run-all build web:clean web:inject-disc web:build && ./bin/web-deploy",
+    "web:deploy": "npm-run-all build web:clean web:inject-disc web:build && bash ./bin/web-deploy",
     "web:generate": "cd website && touch db.json && ./node_modules/.bin/hexo generate",
     "web:inject-bundles-misc": "cd website && node inject.js",
     "web:inject-disc": "npm run build:lib && node ./bin/disc.js",