This repository has been archived by the owner on May 2, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45c7156
commit 5bf99e3
Showing
11 changed files
with
78 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
* text=auto | ||
*.js text eol=lf | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- '10' | ||
- '8' | ||
- '6' | ||
- '4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
* text=auto | ||
*.js text eol=lf | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
'use strict'; | ||
module.exports = (input, opts) => { | ||
|
||
module.exports = (input, options = {}) => { | ||
if (typeof input !== 'string') { | ||
throw new TypeError(`Expected a string, got ${typeof input}`); | ||
} | ||
|
||
opts = opts || {}; | ||
|
||
return input + ' & ' + (opts.postfix || 'rainbows'); | ||
return input + ' & ' + (options.postfix || 'rainbows'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,8 @@ Lorem ipsum. | |
|
||
#### options | ||
|
||
Type: `Object` | ||
|
||
##### foo | ||
|
||
Type: `boolean`<br> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import test from 'ava'; | ||
import m from '.'; | ||
import <%= camelModuleName %> from '.'; | ||
|
||
test('title', t => { | ||
const err = t.throws(() => { | ||
m(123); | ||
<%= camelModuleName %>(123); | ||
}, TypeError); | ||
t.is(err.message, 'Expected a string, got number'); | ||
|
||
t.is(m('unicorns'), 'unicorns & rainbows'); | ||
t.is(<%= camelModuleName %>('unicorns'), 'unicorns & rainbows'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
language: node_js | ||
node_js: | ||
- '10' | ||
- '8' | ||
- '6' | ||
- '4'<% if (codecov) { %> | ||
- '6'<% if (codecov) { %> | ||
after_script: | ||
- './node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov'<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,57 @@ | ||
{ | ||
"name": "generator-nm", | ||
"version": "3.5.0", | ||
"description": "Scaffold out a node module", | ||
"license": "MIT", | ||
"repository": "sindresorhus/generator-nm", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"app" | ||
], | ||
"keywords": [ | ||
"yeoman-generator", | ||
"plugin", | ||
"boilerplate", | ||
"template", | ||
"scaffold", | ||
"node", | ||
"module", | ||
"node_module", | ||
"node-module", | ||
"init", | ||
"sindre" | ||
], | ||
"dependencies": { | ||
"humanize-url": "^1.0.1", | ||
"is-scoped": "^1.0.0", | ||
"normalize-url": "^1.2.0", | ||
"superb": "^1.1.3", | ||
"underscore.string": "^3.0.3", | ||
"yeoman-generator": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"pify": "^3.0.0", | ||
"xo": "*", | ||
"yeoman-assert": "^3.0.0", | ||
"yeoman-test": "^1.0.0" | ||
}, | ||
"ava": { | ||
"failWithoutAssertions": false | ||
}, | ||
"xo": { | ||
"ignores": [ | ||
"app/templates/**" | ||
] | ||
} | ||
"name": "generator-nm", | ||
"version": "3.5.0", | ||
"description": "Scaffold out a node module", | ||
"license": "MIT", | ||
"repository": "sindresorhus/generator-nm", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"app" | ||
], | ||
"keywords": [ | ||
"yeoman-generator", | ||
"plugin", | ||
"boilerplate", | ||
"template", | ||
"scaffold", | ||
"node", | ||
"module", | ||
"node_module", | ||
"node-module", | ||
"init", | ||
"sindre" | ||
], | ||
"dependencies": { | ||
"humanize-url": "^1.0.1", | ||
"is-scoped": "^1.0.0", | ||
"normalize-url": "^2.0.0", | ||
"superb": "^2.0.0", | ||
"underscore.string": "^3.0.3", | ||
"yeoman-generator": "^2.0.5" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"pify": "^3.0.0", | ||
"xo": "*", | ||
"yeoman-assert": "^3.0.0", | ||
"yeoman-test": "^1.0.0" | ||
}, | ||
"ava": { | ||
"failWithoutAssertions": false | ||
}, | ||
"xo": { | ||
"ignores": [ | ||
"app/templates/**" | ||
] | ||
} | ||
} |