Skip to content

Commit

Permalink
chore: attempt to get netlify build to work via cache-busting (#77)
Browse files Browse the repository at this point in the history
* chore: attempt to get netlify build to work via cache-busting

* chore: fix lockfile in docs

- format TOML with Prettier

* chore(netlify): add some comments to config

* chore(scripts): eliminate extra npm build call

* chore(scripts): do not build docs in parallel
  • Loading branch information
boneskull authored Jan 31, 2020
1 parent 75e5d17 commit 097eee4
Show file tree
Hide file tree
Showing 6 changed files with 3,997 additions and 1,697 deletions.
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = {
'*.js': ['eslint --fix'],
'*.{yml,md,mdx}': ['prettier --write'],
'*.{yml,md,mdx,toml}': ['prettier --write'],
'packages/*/package.json': ['syncpack format'],
'./README.md': [
'sync-monorepo-packages --no-package-json -p packages/report-toolkit --force README.md'
Expand Down
13 changes: 11 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[build]
publish = "packages/docs/public"
command = "npm run build:docs:netlify"
publish = "packages/docs/public"
# 1. bust the node_modules cache
# 2. run `npm ci` (which calls `lerna-bootstrap`)
# 3. build gatsby for production (without `--prefix-paths`)
command = """
rm -rf $NETLIFY_CACHE_DIR/node_modules && \
npm ci && \
npm run build:docs:netlify \
"""
# this, I think, tells netlify's built-in `npm install` to do nothing
environment = { NPM_FLAGS = "--dry-run" }
44 changes: 44 additions & 0 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"build": "concurrently npm:build:dist npm:build:declarations",
"build:declarations": "tsc -p tsconfig.declarations.json",
"build:dist": "rollup -c",
"build:docs": "npm run build && concurrently npm:build:docs:cli-output npm:build:docs:api && npm run build:docs:site",
"build:docs:netlify": "npm run build && concurrently npm:build:docs:cli-output npm:build:docs:api && npm run build:docs:site:netlify",
"build:docs": "npm run build:docs:api && npm run build:docs:cli-output && npm run build:docs:site",
"build:docs:netlify": "npm run build:docs:api && npm run build:docs:cli-output && npm run build:docs:site:netlify",
"build:docs:api": "typedoc --tsconfig tsconfig.docs.json --plugin typedoc-plugin-markdown,@boneskull/typedoc-plugin-external-module-name",
"build:docs:cli-output": "node scripts/build-cli-output.js",
"build:docs:site": "lerna run --stream --scope @report-toolkit/docs build",
Expand Down Expand Up @@ -107,6 +107,7 @@
"module-alias": "^2.2.2",
"nyc": "^15.0.0",
"prettier": "^1.19.1",
"prettier-plugin-toml": "^0.3.1",
"proxyquire": "^2.1.3",
"readdir-withfiletypes": "^1.0.2",
"replace-in-files-cli": "^0.3.1",
Expand Down
Loading

0 comments on commit 097eee4

Please sign in to comment.