Add command for auto start doctoc for all files
This commit is contained in:
parent
68820c1dc3
commit
803cd9ec1d
|
@ -0,0 +1,13 @@
|
|||
#! /usr/bin/env node
|
||||
var doctoc = require("doctoc");
|
||||
var shell = require("shelljs");
|
||||
var glob = require("glob");
|
||||
|
||||
/*
|
||||
Generate menu for all ReadMe with DocToc
|
||||
*/
|
||||
glob("./README*.md", function (er, files) {
|
||||
files.forEach(function (item) {
|
||||
shell.exec("doctoc " + item + " --github");
|
||||
})
|
||||
});
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"private": true,
|
||||
"name": "git-flight-rules",
|
||||
"version": "1.0.0",
|
||||
"description": "Flight rules for git",
|
||||
"scripts": {
|
||||
"deploy": "node bin/deploy-translation.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"doctoc": "^1.3.0",
|
||||
"glob": "^7.1.2",
|
||||
"pre-commit": "^1.2.2",
|
||||
"shelljs": "^0.7.8"
|
||||
},
|
||||
"pre-commit": [
|
||||
"deploy"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue