@architect/destroy
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -5,3 +5,3 @@ # Architect Sandbox changelog | ||
## [1.0.0] 2020-06-22 | ||
## [1.0.1] 2020-06-22 | ||
@@ -11,2 +11,3 @@ ### Added | ||
- Say hello to `@architect/destroy`! | ||
- Fixed src/cli to export a function | ||
@@ -13,0 +14,0 @@ --- |
{ | ||
"name": "@architect/destroy", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Destroy projects created with Architect", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -5,18 +5,28 @@ #!/usr/bin/env node | ||
let { version } = require('../package.json') | ||
let { arc } = read() | ||
let destroy = require('./index') | ||
let destroy = require('./index.js') | ||
let update = updater('Destroy') | ||
// Args | ||
let args = process.argv | ||
if (require.main === module) { | ||
(async function () { | ||
try { | ||
await main(process.argv) | ||
} | ||
catch (err) { | ||
console.log(err) | ||
} | ||
})() | ||
} | ||
let findName = p => p === '--name' | ||
let named = args.includes('--name') && (args[args.findIndex(findName) + 1] === arc.app[0]) | ||
// TODO move CLI logic into CLI and turn other libs into stand alone pure modules | ||
async function main () { | ||
let forces = p => [ '-f', '--force', 'force' ].includes(p) | ||
let force = args.some(forces) | ||
let { arc } = read() | ||
let args = process.argv | ||
let findName = p => p === '--name' | ||
let named = args.includes('--name') && (args[args.findIndex(findName) + 1] === arc.app[0]) | ||
let forces = p => [ '-f', '--force', 'force' ].includes(p) | ||
let force = args.some(forces) | ||
let production = args.includes('--production') | ||
let production = args.includes('--production') | ||
;(async function main () { | ||
try { | ||
@@ -53,2 +63,4 @@ banner({ version: `Destroy ${version}` }) | ||
} | ||
})() | ||
} | ||
module.exports = main |
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
8770
226