Skip to content

Commit 3e90cef

Browse files
committed
feat: add cli template
1 parent 44d2765 commit 3e90cef

File tree

6 files changed

+103
-3
lines changed

6 files changed

+103
-3
lines changed

templates/cli/.babelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": [
3+
"es2015"
4+
],
5+
"plugins": [
6+
"add-module-exports"
7+
]
8+
}

templates/cli/.eslintrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"env": {
3+
"es6": true
4+
},
5+
"parserOptions": {
6+
"sourceType": "module"
7+
},
8+
"extends": "standard"
9+
}

templates/cli/.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
3+
node_js:
4+
- '6'
5+
- '5'

templates/cli/Makefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
all: help
3+
4+
help:
5+
echo help
6+
7+
babel:
8+
babel lib/ -d src/
9+
10+
test: babel
11+
mocha -R spec
12+
13+
eslint:
14+
DEBUG="eslint:cli-engine" eslint .
15+
16+
watch:
17+
watchd bin/* lib/**.js test/**.js package.json -c 'bake test'
18+
19+
release: version push publish
20+
21+
version:
22+
standard-version -m '%s'
23+
24+
push:
25+
git push origin master --tags
26+
27+
publish:
28+
npm publish

templates/cli/package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "",
3+
"version": "0.0.0",
4+
"description": "",
5+
"directories": {
6+
"bin": "bin",
7+
"doc": "docs",
8+
"test": "test",
9+
"example": "examples"
10+
},
11+
"scripts": {
12+
"test": "mocha -R spec"
13+
},
14+
"dependencies": {
15+
"minimist": "^1.2.0",
16+
"tabtab": "^1.3.2"
17+
},
18+
"devDependencies": {
19+
"gentle-cli": "^1.0.3",
20+
"mocha": "^2.5.2",
21+
"babel-cli": "^6.9.0",
22+
"babel-plugin-add-module-exports": "^0.2.1",
23+
"babel-preset-es2015": "^6.9.0",
24+
"bake-cli": "0.0.4",
25+
"eslint": "^2.10.2",
26+
"eslint-config-standard": "^5.3.1",
27+
"eslint-plugin-promise": "^1.1.0",
28+
"eslint-plugin-standard": "^1.3.2",
29+
"mocha": "^2.5.2",
30+
"standard-version": "^2.2.1",
31+
"watchd": "github:mklabs/watchd"
32+
},
33+
"bake": {
34+
"description": "Generate a default CLI setup",
35+
"scripts": {
36+
"install": "npm install --loglevel http --cache-min Infinity",
37+
"preinstall": "echo Installing dependencies ...",
38+
"postinstall": "npm ls --depth 1"
39+
}
40+
}
41+
}

test/examples/package.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,22 @@
22
"name": "",
33
"version": "0.0.0",
44
"description": "",
5-
"main": "index.js",
5+
"directories": {
6+
"bin": "bin",
7+
"doc": "docs",
8+
"test": "test",
9+
"example": "examples"
10+
},
611
"scripts": {
712
"test": "mocha -R spec"
813
},
14+
"dependencies": {
15+
"minimist": "^1.2.0",
16+
"tabtab": "^1.3.2"
17+
},
918
"devDependencies": {
19+
"gentle-cli": "^1.0.3",
20+
"mocha": "^2.5.2",
1021
"babel-cli": "^6.9.0",
1122
"babel-plugin-add-module-exports": "^0.2.1",
1223
"babel-preset-es2015": "^6.9.0",
@@ -15,8 +26,6 @@
1526
"eslint-config-standard": "^5.3.1",
1627
"eslint-plugin-promise": "^1.1.0",
1728
"eslint-plugin-standard": "^1.3.2",
18-
"mocha": "^2.5.2",
19-
"qs": "^6.2.0",
2029
"standard-version": "^2.2.1",
2130
"watchd": "github:mklabs/watchd"
2231
}

0 commit comments

Comments
 (0)