Skip to content

Commit

Permalink
made sure docs were only created when they didn't exist, as well as …
Browse files Browse the repository at this point in the history
…making sure documents were not created when using commands to keep the speed high
  • Loading branch information
MutableLoss committed Jun 6, 2017
1 parent 4b6574d commit 3941dec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bin/learnyounode
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env node

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

if(process.argv.slice(2) == 0){
require('../lib/docbuild')
}
5 changes: 4 additions & 1 deletion lib/docbuild.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
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'

createDocs()
fs.stat('../node-apidoc', function (err) {
if (err) { createDocs() }
})

0 comments on commit 3941dec

Please sign in to comment.