Skip to content

Commit

Permalink
Fix build process on Windows (MetaMask#182)
Browse files Browse the repository at this point in the history
Co-authored-by: Whymarrh Whitby <[email protected]>
  • Loading branch information
BboyAkers and whymarrh authored Oct 8, 2020
1 parent 19f0b92 commit f1eeb86
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = (_ctx) => ({
sourceDir: 'docs',
dest: 'docs/dist',

locales: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "MetaMask documentation.",
"scripts": {
"dev": "yarn start",
"start": "node -r dotenv/config node_modules/.bin/vuepress dev docs",
"build": "node -r dotenv/config node_modules/.bin/vuepress build docs",
"start": "node scripts/build.js dev",
"build": "node scripts/build.js build",
"lint": "prettier docs/guide/*.md docs/snippets/*",
"lint:fix": "yarn lint --write",
"view-info": "vuepress view-info docs",
Expand Down
19 changes: 19 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require('dotenv').config()

const { dev, build } = require('vuepress')
const config = require('../docs/.vuepress/config')()

const command = process.argv[2]

switch (command) {
case 'build':
build(config)
return

case 'dev':
dev(config)
return

default:
throw new Error(`Unrecognized command "${command}".`)
}

0 comments on commit f1eeb86

Please sign in to comment.