This repository has been archived by the owner on Jan 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- also add some descriptions to `scripts/package-scripts.js`
- Loading branch information
Showing
3 changed files
with
39 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
'use strict'; | ||
|
||
const chalk = require('chalk'); | ||
const pkg = require('../package.json'); | ||
const join = require('path').join; | ||
|
||
module.exports = { | ||
scripts: { | ||
postinstall: `shx echo "\uD83D\uDC49 ${chalk.yellow(pkg.name)} installation: | ||
1. Follow directions for your platform at ${chalk.underline('https://git.io/vKcdH')} to install prereqs. | ||
2. Execute ${chalk.bold('bundle install')} in this directory. | ||
3. Execute ${chalk.bold('npm start serve')} to serve the site locally."`, | ||
serve: 'bundle exec jekyll serve --safe --drafts --watch', | ||
build: 'bundle exec jekyll build --safe --drafts', | ||
toc: require.resolve('./toc') | ||
exports.scripts = { | ||
serve: { | ||
script: 'bundle exec jekyll serve --safe --drafts --watch', | ||
description: `Build site via Jekyll, watch for changes, serve at ${chalk.underline( | ||
'http://localhost:4000/')}` | ||
}, | ||
build: { | ||
script: 'bundle exec jekyll build --safe --drafts', | ||
description: 'Build site via Jekyll' | ||
}, | ||
toc: { | ||
script: join(__dirname, 'toc.js'), | ||
description: `Rebuild table of contents; mutates ${chalk.bold('index.md')}` | ||
}, | ||
postinstall: { | ||
script: join(__dirname, 'postinstall.js'), | ||
description: 'Displays help after installing' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* Displays some guidance after install | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const chalk = require('chalk'); | ||
const yellow = chalk.yellow; | ||
const bold = chalk.bold; | ||
const hipEmoji = '\uD83D\uDC49'; | ||
const pkg = require('../package.json'); | ||
|
||
console.log(`${hipEmoji} ${chalk.yellow(pkg.name)} installation: | ||
1. Follow instructions for your platform in ${chalk.bold('README.md')}. | ||
2. Execute ${chalk.bold('bundle install')} in this directory to install Jekyll (https://jekyllrb.com/) & its deps. | ||
3. Execute ${chalk.bold('npm start serve')} to build, watch & serve the site. | ||
For more help, execute ${chalk.bold('npm start')}.`); |