Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sunesimonsen committed Oct 30, 2018
1 parent 28359e6 commit 5fd784f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
save-prefix=''
save-exact=true
package-lock=false
5 changes: 2 additions & 3 deletions bin/deploy-site
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
const ghPages = require('gh-pages');
const path = require('path');
const fs = require("fs");
const fs = require('fs');
const childProcess = require('child_process');

const packageJson = path.join(process.cwd(), 'package.json');
Expand All @@ -11,14 +11,13 @@ if (!fs.existsSync(packageJson)) {
process.exit(1);
}

const scripts = JSON.parse(fs.readFileSync(packageJson, 'utf-8')).scripts
const scripts = require(packageJson).scripts

if (!scripts || !scripts['generate-site']) {
console.error('Please setup a generate-site script in your package.json');
process.exit(1);
}


childProcess.execSync('npm run generate-site')

ghPages.publish('site-build', function (err) {
Expand Down

0 comments on commit 5fd784f

Please sign in to comment.