Add command for auto start doctoc for all files

This commit is contained in:
qWici 2017-12-28 02:01:29 +02:00
parent 68820c1dc3
commit 803cd9ec1d
2 changed files with 31 additions and 0 deletions

13
bin/deploy-translation.js Normal file
View File

@ -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");
})
});

18
package.json Normal file
View File

@ -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"
]
}