Skip to content

Commit

Permalink
Add script to automate publishing website into gh-pages branch
Browse files Browse the repository at this point in the history
  • Loading branch information
blikblum committed Apr 4, 2021
1 parent 84f1c8b commit d0d7e64
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 11 deletions.
14 changes: 14 additions & 0 deletions docs/publish_website.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const ghpages = require('gh-pages');

ghpages.publish(
'.',
{
src: ['index.html', 'docs/*.html', 'docs/guide.pdf', 'demo/out.pdf'],
add: true
},
function(err) {
if (err) {
console.error(err);
}
}
);
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"canvas": "^2.6.1",
"codemirror": "~5.49.2",
"eslint": "^7.8.1",
"gh-pages": "^3.1.0",
"iconv-lite": "^0.5.0",
"jest": "^26.4.2",
"jest-screenshot": "^0.3.1",
Expand All @@ -58,6 +59,7 @@
"browser-demo": "browserify demo/browser.js > demo/bundle.js",
"pdf-guide": "node docs/generate.js",
"website": "node docs/generate_website.js",
"publish-website": "node docs/publish_website.js",
"docs": "npm run pdf-guide && npm run website && npm run browser-demo",
"lint": "eslint {lib,tests}/**/*.js",
"prettier": "prettier {lib,tests,demo,docs}/**/*.js",
Expand Down
Loading

0 comments on commit d0d7e64

Please sign in to comment.