Skip to content

Commit

Permalink
reduce amount of noise, and add postinstall script to create docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MutableLoss committed Mar 11, 2018
1 parent 9c7fbf8 commit c766851
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions bin/learnyounode
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env node

require('../learnyounode').execute(process.argv.slice(2))

if(process.argv.slice(2) == 0){
require('../lib/docbuild')
}
8 changes: 6 additions & 2 deletions lib/docbuild.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
var createDocs = require('node-offline-api')
var createDocs = require('node-offline-api').createDocs
var buildOptions = require('node-offline-api').buildOptions
var fs = require('fs')

buildOptions.buildDir = process.cwd()
buildOptions.buildName = 'node_apidoc'

fs.stat('../node-apidoc', function (err) {
if (err.code === 'ENOENT') { createDocs(process.cwd(), 'node_apidoc') }
if (err) { createDocs() }
})
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"concat-stream": "^1.5.1",
"duplexer": "^0.1.1",
"hyperquest": "^2.0.0",
"node-offline-api": "0.12.0",
"node-offline-api": "0.11.0",
"rimraf": "^2.5.4",
"through": "^2.3.8",
"through2": "^2.0.1",
Expand All @@ -81,10 +81,9 @@
"workshopper-adventure-test": "^1.1.2"
},
"scripts": {
"lint": "./node_modules/.bin/standard",
"lint": "./node_modules/.bin/standard --fix",
"test": "npm run lint && ./node_modules/.bin/workshopper-adventure-test",
"release": "./node_modules/.bin/standard-version",
"postinstall": "node ./lib/docbuild.js"
"release": "./node_modules/.bin/standard-version"
},
"bin": {
"learnyounode": "./bin/learnyounode"
Expand Down

0 comments on commit c766851

Please sign in to comment.