@architect/create
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -5,2 +5,10 @@ # Architect Create changelog | ||
## [1.4.1] 2021-03-25 | ||
### Fixed | ||
- Fixed project structure and basic file creation when initializing a fresh new project; fixes [#1078](https://github.com/architect/architect/issues/1078) | ||
--- | ||
## [1.4.0] 2021-03-22 | ||
@@ -7,0 +15,0 @@ |
15
cli.js
@@ -26,8 +26,7 @@ #!/usr/bin/env node | ||
let isStatic = opt => opt === 'static' || opt === '--static' || opt === '-s' | ||
let noInstall = opt => opt === 'noinstall' || opt === '--no-install' || opt === '-n' | ||
// eslint-disable-next-line | ||
async function cmd () { | ||
// Used by bootstrap to differentiate between arc create and preflight bootstrap calls | ||
let standalone = true | ||
let options = process.argv | ||
async function cmd (options) { | ||
options = options || process.argv // passed-in options only used for testing | ||
@@ -49,7 +48,13 @@ // Get the folder name so we know where to inventory | ||
verbose: options.some(isVerbose), | ||
noInstall: options.some(noInstall), | ||
runtime: options.some(isRuntime) ? options.slice(options.findIndex(isRuntime))[1] : false, | ||
} | ||
// Used by bootstrap to differentiate between arc create and preflight bootstrap calls | ||
// (for testing we wanna be able to override it so we dont npm install all the things during integration tests) | ||
let standalone = opts.noInstall ? false : true | ||
// Bootstrap the project on the filesystem, including new dirs, npm i, etc. | ||
// Bootstrap the project on the filesystem, including new dirs, npm i, app.arc manifest, etc. | ||
let { install } = bootstrap({ options, inventory, standalone, update, runtime: opts.runtime }) | ||
// re-seed the inventory since we may now have a new manifest due to bootstrap creating a new project | ||
inventory = await _inventory({ cwd: folder }) | ||
@@ -56,0 +61,0 @@ return create({ options: opts, inventory, folder, install, standalone, update }) |
{ | ||
"name": "@architect/create", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Idempotently initialize Architect projects", | ||
@@ -14,4 +14,5 @@ "main": "src/index.js", | ||
"scripts": { | ||
"test": "npm run lint && npm run coverage", | ||
"test": "npm run lint && npm run test:integration && npm run coverage", | ||
"test:unit": "cross-env PORT=6666 tape 'test/unit/**/*-test.js' | tap-spec", | ||
"test:integration": "cross-env tape 'test/integration/**/*-test.js' | tap-spec", | ||
"coverage": "nyc --reporter=lcov --reporter=text npm run test:unit", | ||
@@ -36,2 +37,3 @@ "lint": "eslint . --fix", | ||
"eslint": "^7.14.0", | ||
"fs-extra": "~9.1.0", | ||
"nyc": "~15.1.0", | ||
@@ -38,0 +40,0 @@ "proxyquire": "^2.1.3", |
@@ -7,2 +7,3 @@ let { parse, resolve } = require('path') | ||
let isRuntime = opt => opt === 'runtime' || opt === '--runtime' || opt === '-r' | ||
let isNoInstall = opt => opt === 'noinstall' || opt === '--no-install' || opt === '-n' | ||
@@ -14,3 +15,3 @@ // Grab runtime value for filtering | ||
if (i === runtime) return false | ||
if (isVerbose(opt) || isRuntime(opt)) return false | ||
if (isVerbose(opt) || isRuntime(opt) || isNoInstall(opt)) return false | ||
return true | ||
@@ -17,0 +18,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
51704
849
8