create-webiny-project 5.17.4 → 5.18.0-beta.3
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/CHANGELOG.md +43 -0
- package/index.js +6 -0
- package/package.json +3 -3
- package/utils/createProject.js +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,49 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.18.0-beta.3](https://github.com/webiny/webiny-js/compare/v5.18.0-beta.2...v5.18.0-beta.3) (2021-11-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package create-webiny-project
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [5.18.0-beta.2](https://github.com/webiny/webiny-js/compare/v5.18.0-beta.1...v5.18.0-beta.2) (2021-11-21)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package create-webiny-project
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [5.18.0-beta.1](https://github.com/webiny/webiny-js/compare/v5.18.0-beta.0...v5.18.0-beta.1) (2021-11-19)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* revert "stable" version ([d5619a2](https://github.com/webiny/webiny-js/commit/d5619a2ad7846c1715f7f328faabb004126bfb6c))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [5.18.0-beta.0](https://github.com/webiny/webiny-js/compare/v5.17.4...v5.18.0-beta.0) (2021-11-19)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* use "stable" instead of "berry" ([2156c2d](https://github.com/webiny/webiny-js/commit/2156c2ddd41b67c86ee0e583edcbd9df48908bb7))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* add --force flag ([d7f65fa](https://github.com/webiny/webiny-js/commit/d7f65faf99f89be1e27ce41ca51db89a7a438ff1))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
6
49
|
## [5.17.4](https://github.com/webiny/webiny-js/compare/v5.17.4-beta.1...v5.17.4) (2021-11-19)
|
|
7
50
|
|
|
8
51
|
**Note:** Version bump only for package create-webiny-project
|
package/index.js
CHANGED
|
@@ -32,6 +32,12 @@ yargs.command(
|
|
|
32
32
|
yargs.positional("project-name", {
|
|
33
33
|
describe: "Project name"
|
|
34
34
|
});
|
|
35
|
+
yargs.option("force", {
|
|
36
|
+
describe: "All project creation within an existing folder",
|
|
37
|
+
default: false,
|
|
38
|
+
type: "boolean",
|
|
39
|
+
demandOption: false
|
|
40
|
+
});
|
|
35
41
|
yargs.option("template", {
|
|
36
42
|
describe: `Name of template to use, if no template is provided it will default to "aws" template`,
|
|
37
43
|
alias: "t",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-webiny-project",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.18.0-beta.3",
|
|
4
4
|
"description": "Webiny project bootstrap tool.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"author": "Webiny Ltd.",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@webiny/telemetry": "5.
|
|
16
|
+
"@webiny/telemetry": "5.18.0-beta.3",
|
|
17
17
|
"chalk": "4.1.0",
|
|
18
18
|
"execa": "4.1.0",
|
|
19
19
|
"find-up": "5.0.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"access": "public",
|
|
36
36
|
"directory": "."
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "9c86670476a62348ce391b091bf768e425ab6ee9"
|
|
39
39
|
}
|
package/utils/createProject.js
CHANGED
|
@@ -16,6 +16,7 @@ const NOT_APPLICABLE = gray("N/A");
|
|
|
16
16
|
|
|
17
17
|
module.exports = async function createProject({
|
|
18
18
|
projectName,
|
|
19
|
+
force,
|
|
19
20
|
template,
|
|
20
21
|
tag,
|
|
21
22
|
log,
|
|
@@ -32,8 +33,17 @@ module.exports = async function createProject({
|
|
|
32
33
|
projectName = path.basename(projectRoot);
|
|
33
34
|
|
|
34
35
|
if (fs.existsSync(projectRoot)) {
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
if (!force) {
|
|
37
|
+
console.log(
|
|
38
|
+
`Cannot continue because the target folder ${red(projectName)} already exists.`
|
|
39
|
+
);
|
|
40
|
+
console.log(
|
|
41
|
+
`If you still wish to proceed, run the same command with the ${red(
|
|
42
|
+
"--force"
|
|
43
|
+
)} flag.`
|
|
44
|
+
);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
// Before create any files, check if there are yarn.lock or package.json anywhere up in the tree.
|