Skip to content

Commit

Permalink
chore: initial commit of files
Browse files Browse the repository at this point in the history
  • Loading branch information
vzaccaria committed Jul 25, 2015
0 parents commit 9bc2451
Show file tree
Hide file tree
Showing 11 changed files with 183 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": {
"es6": true,
"node": true,
"shelljs": true
},
"rules": {
"quotes": [1, "double"],
"no-extra-semi": 0,
"semi": 0,
"eol-last": 0,
"no-shadow": 0
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
lib
makefile
api.md
13 changes: 13 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"asi": true,
"node": true,
"esnext": true,
"bitwise": true,
"curly": true,
"immed": true,
"newcap": true,
"noarg": true,
"undef": true,
"unused": "vars",
"strict": true
}
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src/*
verbfile.js
docs/*
47 changes: 47 additions & 0 deletions configure.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
var {
generateProject
} = require('diy-build')

var path = require('path')

generateProject(_ => {

_.babel = (dir, ...deps) => {
var command = (_) => `./node_modules/.bin/babel ${_.source} -o ${_.product}`
var product = (_) => `./lib/${path.basename(_.source)}`
_.compileFiles(...([command, product, dir].concat(deps)))
}

_.collect("docs", _ => {
_.cmd("./node_modules/.bin/git-hist history.md")
_.cmd("./node_modules/.bin/autobadger > readme.md")
_.cmd("./node_modules/.bin/mustache package.json docs/readme.md >> readme.md")
_.cmd("cat history.md >> readme.md")
_.cmd("hub cm 'update docs and history.md'")
})


_.collectSeq("all", _ => {
_.collect("build", _ => {
_.babel("src/*.js")
})
_.cmd("cp ./lib/index.js ./index.js")
})

_.collect("test", _ => {
_.cmd("make all")
_.cmd("./node_modules/.bin/mocha ./lib/test.js")
})

_.collect("update", _ => {
_.cmd("make clean && ./node_modules/.bin/babel configure.js | node")
});

["major", "minor", "patch"].map(it => {
_.collect(it, _ => {
_.cmd(`make all`)
_.cmd(`./node_modules/.bin/xyz -i ${it}`)
})
})

})
20 changes: 20 additions & 0 deletions docs/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# zaccaria-cli
> {{description}}
## Install

Install it with

```
npm install zaccaria-cli
```

## Author

* Vittorio Zaccaria

## License
Released under the BSD License.

***

16 changes: 16 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"use strict";

var shelljs = require("shelljs");
var promise = require("bluebird");
var _ = require("lodash");

var _module = function () {

var foo = function () {};

return {
foo: foo
};
};

module.exports = _module();
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "zaccaria-cli",
"version": "0.0.1",
"description": "No name given yet",
"main": "index.js",
"scripts": {
"test": "make test"
},
"repository": {
"type": "git",
"url": "https://github.com/vzaccaria/zaccaria-cli.git"
},
"author": "Vittorio Zaccaria",
"license": "BSD",
"bugs": {
"url": "https://github.com/vzaccaria/zaccaria-cli/issues"
},
"homepage": "https://github.com/vzaccaria/zaccaria-cli",
"dependencies": {
"autobadger": "0.0.2",
"bluebird": "^2.9.14",
"debug": "^2.1.3",
"markdox": "^0.1.8"
},
"devDependencies": {
"babel": "^4.7.16",
"diy-build": "^1.0.8",
"xyz": "*",
"mocha": "*",
"chai": "*",
"chai-as-promised": "*"
}
}
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

My swiss knife library for cli applications
16 changes: 16 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var shelljs = require( 'shelljs' )
var promise = require( 'bluebird' )
var _ = require( 'lodash' )

var _module = () => {

var foo = () => {

}

return {
foo
}
}

module.exports = _module()
15 changes: 15 additions & 0 deletions src/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var chai = require( 'chai' )
chai.use( require( 'chai-as-promised' ) )
var should = chai.should()

/*global describe, it, before, beforeEach, after, afterEach */

describe( '#module', () => {
"use strict"
it( 'should load the module', () => {

var mod = require( '..' )
should.exist( mod )

} )
} )

0 comments on commit 9bc2451

Please sign in to comment.