Skip to content

Commit

Permalink
Merge pull request #73 from rista404/master
Browse files Browse the repository at this point in the history
Adds babel build system. Adds GPL-3.0 License.
  • Loading branch information
accraze authored Oct 2, 2016
2 parents b633f84 + cdf1e0b commit 3d4193f
Show file tree
Hide file tree
Showing 14 changed files with 748 additions and 59 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage/
node_modules/
npm-debug.log
dist/
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ before_install:
- npm i -g npm@^2.0.0
before_script:
- npm prune
- npm run build
script:
- npm run test:single
after_success:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ NodeJS CLI that generates a LICENSE file for your open source projects.
* MIT
* ISC
* BSD 3
* Apache 2.0
* GPL-3.0
* UNLICENSE
* NO LICENSE/COPYRIGHT ONLY

Expand Down
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"scripts": {
"test": "mocha tests/index.test.js -w ",
"test:single": "istanbul cover -x *.test.js,src/index.js _mocha tests/index.test.js",
"postbuild": "cp src/index.sh dist",
"build": "babel src --out-dir dist",
"build:watch": "babel src --out-dir dist --watch",
"commit": "git-cz",
"report-coverage": "cat ./coverage/lcov.info | codecov",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
Expand All @@ -25,25 +28,27 @@
"project"
],
"devDependencies": {
"commitizen": "2.8.6",
"babel-cli": "^6.16.0",
"babel-preset-es2015": "^6.16.0",
"chai": "3.5.0",
"cz-conventional-changelog": "1.2.0",
"mocha": "3.0.2",
"codecov.io": "0.1.6",
"commitizen": "2.8.6",
"cz-conventional-changelog": "1.2.0",
"ghooks": "1.3.2",
"istanbul": "0.4.5",
"mocha": "3.0.2",
"semantic-release": "^4.3.5"
},
"czConfig": {
"path": "node_modules/cz-conventional-changelog"
},
"config": {
"ghooks": {
"pre-commit": "npm run test:single"
"pre-commit": "npm run build; npm run test:single"
}
},
"bin": {
"make-license": "src/index.sh"
"make-license": "dist/index.sh"
},
"repository": {
"type": "git",
Expand Down
13 changes: 5 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
#!/usr/bin/env node --harmony

var inquirer = require("inquirer");
var makeLicense = require("./make-license.js")
import inquirer from "inquirer";
import makeLicense from "./make-license.js";

console.log("make-license");


var questions = [
const questions = [
{
type: "list",
name: "license",
message: "Choose a License",
choices: [ "MIT", "ISC", "BSD 2", "BSD 3", "Apache 2.0", "UNLICENSE", "NO LICENSE" ]
choices: [ "MIT", "ISC", "BSD 2", "BSD 3", "Apache 2.0", "GPL-3.0", "UNLICENSE", "NO LICENSE"]
}
];

inquirer.prompt(questions).then(function( answers ) {
makeLicense(answers);
});
inquirer.prompt(questions).then(makeLicense);
4 changes: 2 additions & 2 deletions src/licenses/bsd2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var bsd2 = "\nAll rights reserved.\n\n"+
const bsd2 = "All rights reserved.\n\n"+
"Redistribution and use in source and binary forms, with or without\n" +
"modification, are permitted provided that the following conditions are met:\n\n" +
"1. Redistributions of source code must retain the above copyright notice,\n" +
Expand All @@ -17,4 +17,4 @@ var bsd2 = "\nAll rights reserved.\n\n"+
"IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" +
"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n";

module.exports = bsd2;
export default bsd2;
7 changes: 3 additions & 4 deletions src/licenses/bsd3.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


var bsd3 = "\nAll rights reserved.\n\n"+
const bsd3 = "\nAll rights reserved.\n\n"+
"Redistribution and use in source and binary forms, with or without\n" +
"modification, are permitted provided that the following conditions are met:\n\n" +
"* Redistributions of source code must retain the above copyright notice, this\n" +
Expand All @@ -23,4 +21,5 @@ var bsd3 = "\nAll rights reserved.\n\n"+
"OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n";


module.exports = bsd3;
export default bsd3;

Loading

0 comments on commit 3d4193f

Please sign in to comment.