create-coralite 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/index.js
CHANGED
|
@@ -62,13 +62,13 @@ const renameFiles = {
|
|
|
62
62
|
|
|
63
63
|
async function createProject () {
|
|
64
64
|
const argTemplate = options.template
|
|
65
|
-
let target = options.
|
|
65
|
+
let target = options.output
|
|
66
66
|
let template = argTemplate
|
|
67
67
|
const pkgInfo = extractPackageInfoFromUserAgent(process.env.npm_config_user_agent)
|
|
68
68
|
|
|
69
69
|
// get project name and target directory
|
|
70
70
|
if (target) {
|
|
71
|
-
target = formatTargetDir(options.
|
|
71
|
+
target = formatTargetDir(options.output)
|
|
72
72
|
} else {
|
|
73
73
|
const projectName = await prompts.text({
|
|
74
74
|
message: 'Project name:',
|
|
@@ -159,7 +159,7 @@ async function createProject () {
|
|
|
159
159
|
template = selectedTemplate
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
const root = path.
|
|
162
|
+
const root = path.resolve(cwd, target)
|
|
163
163
|
fs.mkdirSync(root, { recursive: true })
|
|
164
164
|
|
|
165
165
|
const pkgManager = pkgInfo ? pkgInfo.name : 'npm'
|
package/package.json
CHANGED