From afdb9dcbabc076d586c9625c560dd9cc626b491c Mon Sep 17 00:00:00 2001 From: Ryan Roemer Date: Fri, 6 Mar 2020 11:47:19 -0800 Subject: [PATCH 1/3] various cleanup --- docs/dist-prod/open-source/spectacle | 1 + docs/package.json | 4 ++-- docs/static-config-parts/static-webpack-config.js | 15 +++++++++++++++ package.json | 2 +- yarn.lock | 10 +++++++++- 5 files changed, 28 insertions(+), 4 deletions(-) create mode 120000 docs/dist-prod/open-source/spectacle diff --git a/docs/dist-prod/open-source/spectacle b/docs/dist-prod/open-source/spectacle new file mode 120000 index 000000000..7724b9223 --- /dev/null +++ b/docs/dist-prod/open-source/spectacle @@ -0,0 +1 @@ +../../dist \ No newline at end of file diff --git a/docs/package.json b/docs/package.json index 948583586..47759e98b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -16,8 +16,8 @@ "check-ci": "yarn run lint", "clean": "rimraf dist", "format": "yarn run lint --fix && yarn run prettier-all", - "lint": "eslint 'src/**/*.js' 'static-config-*/*.js' 'src/**/*.js' 'static.config.js'", - "prettier-all": "prettier --write '{src,static-config-helpers,static-config-parts,static.config,scripts,lib}/**/*.{js,jsx}'", + "lint": "eslint '*.js' src scripts 'static-config-*/*.js'", + "prettier-all": "prettier --write '{src,static-config-helpers,static-config-parts,static.config,scripts}/**/*.{js,jsx}'", "preversion": "yarn run lint && yarn run build", "prod:build": "react-static build", "prod:deploy": "node scripts/deploy/aws.js", diff --git a/docs/static-config-parts/static-webpack-config.js b/docs/static-config-parts/static-webpack-config.js index cea4cd9af..28d2fb10b 100644 --- a/docs/static-config-parts/static-webpack-config.js +++ b/docs/static-config-parts/static-webpack-config.js @@ -2,7 +2,22 @@ // THAT ENHANCES THE BASE REACT-STATIC WEBPACK CONFIG. const staticWebpackConfig = (config, { defaultLoaders }) => { + // BUG/HACK: Disable CSS minification to avoid module build error: + // "Module build failed: BrowserslistError: Unknown browser query `dead`" + // https://github.com/FormidableLabs/spectacle/issues/857 + defaultLoaders.cssLoader.loader.forEach(({ loader, options }) => { + if (loader === 'css-loader') { + options.minimize = false; + } + }); + + // Add development file info. + config.output.pathinfo = + config.output.pathinfo || process.env.REACT_STATIC_ENV === 'development'; + // No source maps. config.devtool = false; + + // Enhance rules. config.module.rules = [ { oneOf: [ diff --git a/package.json b/package.json index 4c3fee04c..d27d1333c 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "check": "yarn lint && yarn prettier-check && yarn test", "check-ci": "yarn run check", "format": "yarn run lint-fix && yarn run prettier-fix", - "lint": "eslint --ignore-path .gitignore .", + "lint": "eslint '*.js' 'examples/**/*.js' src scripts 'docs/*.js' docs/src docs/scripts 'docs/static-config-*/*.js'", "lint-fix": "yarn lint --fix", "prettier": "prettier \"**/*.{js,json,ts,css,md}\"", "prettier-check": "yarn prettier --check", diff --git a/yarn.lock b/yarn.lock index 0d3fd60de..5d78f153c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6309,7 +6309,7 @@ react-is@^16.12.0, react-is@^16.8.4: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== -react-is@^16.6.0, react-is@^16.8.1, react-is@^16.8.6, react-is@^16.9.0: +react-is@^16.6.0, react-is@^16.8.1, react-is@^16.9.0: version "16.9.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb" integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw== @@ -6733,6 +6733,14 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== +scheduler@^0.15.0: + version "0.15.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.15.0.tgz#6bfcf80ff850b280fed4aeecc6513bc0b4f17f8e" + integrity sha512-xAefmSfN6jqAa7Kuq7LIJY0bwAPG3xlCj0HMEBQk1lxYiDKZscY2xJ5U/61ZTrYbmNQbXa+gc7czPkVo11tnCg== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + scheduler@^0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.18.0.tgz#5901ad6659bc1d8f3fdaf36eb7a67b0d6746b1c4" From 1185e86376317e86365448f7385479b2a1732a8e Mon Sep 17 00:00:00 2001 From: Ryan Roemer Date: Fri, 6 Mar 2020 11:54:01 -0800 Subject: [PATCH 2/3] Temp enable travis. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 8daa59d18..291015f21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ sudo: false branches: only: - master + - task/rewrite # TODO: DISABLE. Just want surge build. env: global: From fdc6d209515e62e231f6c303d96e4da828d6c32e Mon Sep 17 00:00:00 2001 From: Ryan Roemer Date: Fri, 6 Mar 2020 12:01:25 -0800 Subject: [PATCH 3/3] Disable task/rewrite CI --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 291015f21..8daa59d18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ sudo: false branches: only: - master - - task/rewrite # TODO: DISABLE. Just want surge build. env: global: