Skip to content

Commit

Permalink
build: use dist-web/ for publishing to GitHub Pages
Browse files Browse the repository at this point in the history
- When building the browser demo page, generate files to `dist-web/`
  instead of `examples/browser/dist/`.
- `dist-web/` will be used to gather build artifacts from multiple build
  configs (including the upcoming benchmark page).
- Update ignore files to correctly handle `dist-web/`
- `npm run clear` also deletes `dist-web/`
  • Loading branch information
pastelmind committed Jan 27, 2022
1 parent 6aa9913 commit d16c6ab
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/dist/
/dist-web/
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ bower_components
.DS_Store
Thumbs.db

# Ignore built ts files
dist/**/*
# Ignore build artifacts
/dist/
/dist-web/

# Coverage reports generated by test suites
/coverage/
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/coverage/
/dist/
/examples/browser/dist/
/dist-web/
1 change: 0 additions & 1 deletion examples/browser/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion examples/browser/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default (env, argv) => {
clean: true,
filename: "[name].js",
assetModuleFilename: "[name][ext]",
path: path.resolve(__dirname, "dist"),
path: path.resolve(__dirname, "../../dist-web"),
},
target: ["web", "es2018"],
module: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"scripts": {
"build": "webpack --mode=production",
"build:browser": "webpack -c examples/browser/webpack.config.js --mode=production",
"clear": "rimraf dist/",
"deploy": "npm run build:browser && gh-pages -d examples/browser/dist",
"clear": "rimraf dist/ dist-web/",
"deploy": "npm run build:browser && gh-pages -d dist-web/",
"fix": "eslint --fix . && prettier --write .",
"lint": "eslint . && prettier --check .",
"prepare": "husky install",
Expand Down

0 comments on commit d16c6ab

Please sign in to comment.