@danmasta/interpolate
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -69,3 +69,3 @@ #!/usr/bin/env node | ||
interpolate.parseFile(opts.input, opts.output, opts.src); | ||
// interpolate.parseFile(opts.input, opts.output, opts.src); | ||
@@ -72,0 +72,0 @@ } else { |
@@ -5,3 +5,3 @@ const Interpolate = require('./lib/interpolate'); | ||
exports.parse = Interpolate.parseStrFactory(); | ||
exports.file = Interpolate.parseFileFactory(); | ||
// exports.file = Interpolate.parseFileFactory(); | ||
exports.Interpolate = Interpolate; |
@@ -5,3 +5,2 @@ const path = require('path'); | ||
const { mkdirp } = require('mkdirp'); | ||
const walk = require('@danmasta/walk'); | ||
const _ = require('lodash'); | ||
@@ -214,18 +213,18 @@ const util = require('./util'); | ||
parseFile (input, output, src) { | ||
// parseFile (input, output, src) { | ||
return walk(input, { src }).each(file => { | ||
// return walk(input, { src }).each(file => { | ||
let dst = path.resolve(output, file.relative || file.base); | ||
let dir = path.dirname(dst); | ||
// let dst = path.resolve(output, file.relative || file.base); | ||
// let dir = path.dirname(dst); | ||
return mkdirp(dir).then(() => { | ||
return file.readStr().then(str => { | ||
return fs.promises.writeFile(dst, this.parseStr(str)); | ||
}); | ||
}); | ||
// return mkdirp(dir).then(() => { | ||
// return file.readStr().then(str => { | ||
// return fs.promises.writeFile(dst, this.parseStr(str)); | ||
// }); | ||
// }); | ||
}); | ||
// }); | ||
} | ||
// } | ||
@@ -250,8 +249,8 @@ static factory () { | ||
static parseFileFactory () { | ||
let Fn = this; | ||
return function interpolateFactory (opts) { | ||
return new Fn(opts).parseFile(opts.input, opts.output, opts.src); | ||
}; | ||
} | ||
// static parseFileFactory () { | ||
// let Fn = this; | ||
// return function interpolateFactory (opts) { | ||
// return new Fn(opts).parseFile(opts.input, opts.output, opts.src); | ||
// }; | ||
// } | ||
@@ -258,0 +257,0 @@ } |
{ | ||
"name": "@danmasta/interpolate", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"author": "Daniel Smith <dannmasta@gmail.com>", | ||
@@ -36,3 +36,2 @@ "description": "Simple string interpolation helper", | ||
"dependencies": { | ||
"@danmasta/walk": "^4.0.1", | ||
"lodash": "^4.17.21", | ||
@@ -39,0 +38,0 @@ "minimist": "^1.2.8", |
@@ -18,7 +18,7 @@ # Interpolate | ||
``` | ||
npm install @danmasta/interpolate --save | ||
npm install interpolate@github:danmasta/interpolate --save | ||
``` | ||
Require the package in your app | ||
```js | ||
const interpolate = require('@danmasta/interpolate'); | ||
const interpolate = require('interpolate'); | ||
``` | ||
@@ -25,0 +25,0 @@ |
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
3
20866
452
- Removed@danmasta/walk@^4.0.1