Comparing version 1.0.0 to 1.1.0
@@ -27,3 +27,3 @@ #!/usr/bin/env node | ||
.on('file', function(file) { | ||
var relativePath = file.replace(source, '') | ||
var relativePath = path.relative(source, file).replace(/^__/, '.') | ||
, destFile = path.join(dest, relativePath) | ||
@@ -30,0 +30,0 @@ |
{ | ||
"name": "generify", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A reusable project generator", | ||
@@ -30,2 +30,3 @@ "main": "generify.js", | ||
"osenv": "^0.1.0", | ||
"rimraf": "^2.2.8", | ||
"tape": "^3.0.0" | ||
@@ -32,0 +33,0 @@ }, |
@@ -27,2 +27,8 @@ generify | ||
### `__` handling | ||
If a file begins with `__` that will be automatically converted into a | ||
`.`. This is useful for generating `.gitignore` files, as on NPM a | ||
`.gitignore` file will be automatically converted into a `.npmignore`. | ||
Executable | ||
@@ -29,0 +35,0 @@ ---------- |
10
test.js
@@ -7,2 +7,3 @@ var generify = require('./') | ||
, osenv = require('osenv') | ||
, rimraf = require('rimraf') | ||
, base = './fixture' | ||
@@ -69,3 +70,3 @@ | ||
test(fixture, function(t) { | ||
t.plan(Object.keys(expected).length + 1) | ||
t.plan(Object.keys(expected).length + 2) | ||
@@ -81,7 +82,12 @@ var dest = path.join(osenv.tmpdir(), 'generify', fixture) | ||
file = file.replace(dest, '') | ||
t.deepEqual(data.toString(), expected[file], file + ' not matching'); | ||
t.deepEqual(data.toString(), expected[file], file + ' matching'); | ||
}) | ||
}) | ||
.on('end', function() { | ||
rimraf(dest, function(err) { | ||
t.notOk(err, 'no error in deleting everything') | ||
}) | ||
}) | ||
}) | ||
}) | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7691
17
145
51
4