Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ungoldman committed Apr 7, 2015
1 parent 811104b commit 29202ad
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 37 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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*
Expand Down
60 changes: 30 additions & 30 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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}`)
// }
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand All @@ -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')
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"bugs": {
"url": "https://github.com/ngoldman/module-init/issues"
Expand Down
1 change: 0 additions & 1 deletion templates/pkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 29202ad

Please sign in to comment.