boilersuit
Advanced tools
Comparing version 0.1.8 to 0.1.9
16
index.js
@@ -8,10 +8,16 @@ #!/usr/bin/env node | ||
program.version('0.1.8'); | ||
program.version('0.1.9'); | ||
program.command('up').action(() => { | ||
console.log('Watching all suit.json files...'.yellow); | ||
gaze('**/suit.json', (err, watcher) => { | ||
const watchedFiles = Object.keys(watcher.relative()).length; | ||
console.log( | ||
`Watching ${watchedFiles} suit.json ${ | ||
watchedFiles > 1 ? 'files' : 'file' | ||
}...`.yellow, | ||
); | ||
/** This does it the first time */ | ||
Object.entries(watcher.relative()).forEach(entry => { | ||
const schemaFile = entry[0] + entry[1][0]; | ||
// This bit of fidgeting allows for suiting up from the same folder | ||
const schemaFile = (entry[0] === '.' ? './' : entry[0]) + entry[1][0]; | ||
up(schemaFile); | ||
@@ -24,7 +30,7 @@ }); | ||
watcher.on('changed', schemaFile => { | ||
console.log('File changed, making changes...'.yellow); | ||
const relativePath = Object.keys(relativePaths).filter(path => | ||
schemaFile.includes(path), | ||
)[0]; | ||
up(relativePath + 'suit.json'); | ||
up((relativePath === '.' ? './' : relativePath) + 'suit.json'); | ||
}); | ||
@@ -31,0 +37,0 @@ }); |
{ | ||
"name": "boilersuit", | ||
"description": "A CLI tool for generating selectors, reducers, actions, constants and sagas in react-boilerplate", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "author": "matt <matt.pocock@thevirtualforge.com>", |
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
170356
3189