From 29202adff327856b185136ac23176c2622c5e630 Mon Sep 17 00:00:00 2001 From: Nate Goldman Date: Tue, 7 Apr 2015 01:04:31 -0700 Subject: [PATCH] 0.1.1 --- CHANGELOG.md | 6 +++++ README.md | 4 ++-- bin/cli.js | 60 ++++++++++++++++++++++++------------------------ index.js | 5 ++-- package.json | 4 ++-- templates/pkg.js | 1 - 6 files changed, 43 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c09e81d..cd0bbd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,5 +3,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## 0.1.1 +* add newline to blank `index.js` & `test/index.js` +* remove fake github repo confirmation & creation +* removed unused dependency (mkdirp) +* disable keywords for now + ## 0.1.0 * working draft diff --git a/README.md b/README.md index 2728e7c..c961341 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ *work in progress* -Create a node module with all the right stuff (wip). +Create a new node module with all the right stuff. Note: This module uses [ES6 template strings](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings) so it's only for [io.js](https://iojs.org/en/index.html) right now. @@ -28,7 +28,7 @@ The idea is to create the following in the working directory: * [`node_modules` cached](http://blog.travis-ci.com/2013-12-05-speed-up-your-builds-cache-your-dependencies/) * set to test `0.12`, `iojs` * hook added w/ `travisjs hook` *incomplete* -* `.gitignore` w/ `node_modules` ignored +* create `.gitignore` w/ `node_modules` ignored * create blank `index.js` * create blank `test/index.js` * create repo on github *incomplete* diff --git a/bin/cli.js b/bin/cli.js index a1e038e..e1cb7e4 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -22,11 +22,11 @@ var questions = [{ message: 'description', default: 'wip' }, -{ - type: 'input', - name: 'pkgKeywords', - message: 'keywords' -}, +// { +// type: 'input', +// name: 'pkgKeywords', +// message: 'keywords' +// }, { type: 'input', name: 'pkgLicense', @@ -50,38 +50,38 @@ inquirer.prompt(questions, function (data) { data.usrNpm = exec('npm whoami', { silent: true }).output.replace('\n', '') if (!data.pkgDescription) data.pkgDescription = '' - if (data.pkgKeywords) { - data.pkgKeywords = data.pkgKeywords - .split(/[\s,]+/) - .filter(function (value, index, self) { - return !!value && self.indexOf(value) === index - }) - } else { - data.pkgKeywords = [] - } + // if (data.pkgKeywords) { + // data.pkgKeywords = data.pkgKeywords + // .split(/[\s,]+/) + // .filter(function (value, index, self) { + // return !!value && self.indexOf(value) === index + // }) + // } else { + data.pkgKeywords = [] + // } init(data, function (err, res) { if (err) throw err console.log(`local files for ${res} created`) - inquirer.prompt({ - type: 'confirm', - name: 'confirm', - message: `git init & create repo ${data.usrGithub}/${data.pkgName}?`, - default: true, - validate: function (input) { - if (!input) return false - return true - } - }, function (answer) { - if (!answer.confirm) return process.exit(0) + // inquirer.prompt({ + // type: 'confirm', + // name: 'confirm', + // message: `git init & create repo ${data.usrGithub}/${data.pkgName}?`, + // default: true, + // validate: function (input) { + // if (!input) return false + // return true + // } + // }, function (answer) { + // if (!answer.confirm) return process.exit(0) - createRepo(`${data.usrGithub}/${data.pkgName}`) - }) + // createRepo(`${data.usrGithub}/${data.pkgName}`) + // }) }) }) -function createRepo (repo) { - console.log(`https://github.com/${repo}`) -} +// function createRepo (repo) { +// console.log(`https://github.com/${repo}`) +// } diff --git a/index.js b/index.js index e94b089..889b9d7 100644 --- a/index.js +++ b/index.js @@ -54,7 +54,7 @@ function createTestFile () { if (!fs.existsSync(dirPath)) fs.mkdirSync(dirPath) - fs.writeFileSync(filePath) + fs.writeFileSync(filePath, '\n') console.log('Created test/index.js') } @@ -65,5 +65,6 @@ function createIndexFile () { return console.log('index.js already exists') } - fs.writeFileSync(filePath) + fs.writeFileSync(filePath, '\n') + console.log('Created index.js') } diff --git a/package.json b/package.json index fc8ef9c..5a48d4c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "module-init", - "description": "Create a node module the way Nate likes it.", - "version": "0.1.0", + "description": "Create a new node module with all the right stuff.", + "version": "0.1.1", "author": "Nate Goldman ", "bugs": { "url": "https://github.com/ngoldman/module-init/issues" diff --git a/templates/pkg.js b/templates/pkg.js index 558de6b..5e6d7cc 100644 --- a/templates/pkg.js +++ b/templates/pkg.js @@ -16,7 +16,6 @@ function pkg (data) { "tape": "^4.0.0" }, "homepage": "https://github.com/${data.usrGithub}/${data.pkgName}", - "keywords": ${data.pkgKeywords}, "license": "${data.pkgLicense}", "main": "index.js", "repository": {