create-webiny-project 5.37.3-beta.1 → 5.37.3-beta.2

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.
Files changed (2) hide show
  1. package/README.md +49 -31
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -12,27 +12,33 @@ A tool for setting up a new Webiny project.
12
12
  #### Simple:
13
13
 
14
14
  ```
15
- npx create-webiny-project@beta my-test-project --tag beta
15
+ npx create-webiny-project@local-npm my-test-project --tag local-npm
16
16
  ```
17
17
 
18
18
  #### Advanced:
19
19
 
20
20
  ```
21
- npx create-webiny-project@beta my-test-project
22
- --tag beta --no-interactive
21
+ npx create-webiny-project@local-npm my-test-project
22
+ --tag local-npm --no-interactive
23
23
  --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}'
24
24
  --template-options '{"region":"eu-central-1","vpc":false}'
25
25
  ```
26
26
 
27
27
  This usage is more ideal for CI/CD environments, where interactivity is not available.
28
28
 
29
- But do note that this is probably more useful to us, Webiny developers, than for actual Webiny projects. This is simply because in real project's CI/CD pipelines, users would simply start off by cloning the project from their private repository, and not create a new one with the above command.
29
+ But do note that this is probably more useful to us, Webiny developers, than for actual Webiny projects. This is simply
30
+ because in real project's CI/CD pipelines, users would simply start off by cloning the project from their private
31
+ repository, and not create a new one with the above command.
30
32
 
31
33
  ## Development Notes
32
34
 
33
- Testing this, and related packages (like [cwp-template-aws](./../cwp-template-aws)) is a bit complicated, because in order to get the best results, it's recommended to test everything with packages published to a real NPM.
35
+ Testing this, and related packages (like [cwp-template-aws](./../cwp-template-aws)) is a bit complicated, because in
36
+ order to get the best results, it's recommended to test everything with packages published to a real NPM.
34
37
 
35
- But of course, publishing to NPM just to test something is not ideal, and that's why, we use [Verdaccio](https://verdaccio.org/) instead, which is, basically, an NPM-like service you can run locally. So, instead of publishing packages to NPM, you publish them to Verdaccio, which is much cleaner, because everything stays on your laptop.
38
+ But of course, publishing to NPM just to test something is not ideal, and that's why, we
39
+ use [Verdaccio](https://verdaccio.org/) instead, which is, basically, an NPM-like service you can run locally. So,
40
+ instead of publishing packages to NPM, you publish them to Verdaccio, which is much cleaner, because everything stays on
41
+ your laptop.
36
42
 
37
43
  #### Usage
38
44
 
@@ -42,19 +48,25 @@ The following steps show how to do it.
42
48
 
43
49
  #### 1. Start Verdaccio
44
50
 
45
- Start by running the `yarn verdaccio:start` command, which will, as the script name itself suggests, spin up Verdaccio locally.
51
+ Start by running the `yarn verdaccio:start` command, which will, as the script name itself suggests, spin up Verdaccio
52
+ locally.
46
53
 
47
- > All of the files uploaded to Verdaccio service will be stored in the `.verdaccio` folder, located in your project root.
54
+ > All of the files uploaded to Verdaccio service will be stored in the `.verdaccio` folder, located in your project
55
+ > root.
48
56
 
49
57
  #### 2. Set default NPM registry
50
58
 
51
- Once you have Verdaccio up and running, you'll also need to change the default NPM registry. Meaning, when you run `npx create-webiny-project ...`, you want it to start fetching packages from Verdaccio, not real NPM. Verdaccio runs on localhost, on port 4873, so, in your terminal, run the following command:
59
+ Once you have Verdaccio up and running, you'll also need to change the default NPM registry. Meaning, when you
60
+ run `npx create-webiny-project ...`, you want it to start fetching packages from Verdaccio, not real NPM. Verdaccio runs
61
+ on localhost, on port 4873, so, in your terminal, run the following command:
52
62
 
53
63
  ```
54
64
  npm config set registry http://localhost:4873
55
65
  ```
56
66
 
57
- Note that this will only help you with `npx`, but won't help you when a new project foundation is created, and the dependencies start to get pulled. This is because we're using yarn2, which actually doesn't respect the values that were written by the `npm config set ...` command we just executed.
67
+ Note that this will only help you with `npx`, but won't help you when a new project foundation is created, and the
68
+ dependencies start to get pulled. This is because we're using yarn2, which actually doesn't respect the values that were
69
+ written by the `npm config set ...` command we just executed.
58
70
 
59
71
  It's super important that, when you're testing your npx project, you also pass the following argument:
60
72
 
@@ -62,15 +74,16 @@ It's super important that, when you're testing your npx project, you also pass t
62
74
  --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}'
63
75
  ```
64
76
 
65
- This will set the necessary values in yarn2 config file, which will be located in your newly created project. But don't worry about it right now, this will be revisited in step 4.
77
+ This will set the necessary values in yarn2 config file, which will be located in your newly created project. But don't
78
+ worry about it right now, this will be revisited in step 4.
66
79
 
67
- > Yarn2 projects don't rely on global configurations and is not installed globally, but on per-project basis. This allows having multiple versions of yarn2, for different projects.
80
+ > Yarn2 projects don't rely on global configurations and is not installed globally, but on per-project basis. This
81
+ > allows having multiple versions of yarn2, for different projects.
68
82
 
69
83
  #### 3. Release
70
84
 
71
85
  Commit (no need to push it if you don't want to) all of the code changes, and execute the following command:
72
86
 
73
-
74
87
  ```bash
75
88
  yarn release --type=verdaccio
76
89
  ```
@@ -80,7 +93,7 @@ yarn release --type=verdaccio
80
93
  Test your changes with the following command:
81
94
 
82
95
  ```
83
- npx create-webiny-project@next my-test-project --tag next --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}'
96
+ npx create-webiny-project@local-npm my-test-project --tag local-npm --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}'
84
97
  ```
85
98
 
86
99
  This should create a project, with all of the packages pulled from Verdaccio.
@@ -94,17 +107,17 @@ Once you're done, do the following:
94
107
 
95
108
  ### Commands Cheat Sheet
96
109
 
97
- | Description | Command |
98
- |-----------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
99
- | Remove `.verdaccio` folder | `rm -rf .verdaccio` |
100
- | List all v5\* tags | `git tag -l "v5*"` |
101
- | Remove specific tag | `git tag -d "v5.0.0-next.5"` |
102
- | Set Verdaccio as the NPM registry | `npm config set registry http://localhost:4873` |
103
- | Reset NPM registry | `npm config set registry https://registry.npmjs.org/` |
104
- | Start Verdaccio | `yarn verdaccio:start` |
105
- | Release to Verdaccio | `yarn release --type=verdaccio` |
106
- | Create a new Webiny project | `npx create-webiny-project@next my-test-project --tag next --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}'` |
107
- | Revert versioning commit | `git reset HEAD~ && git reset --hard HEAD` |
110
+ | Description | Command |
111
+ |-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
112
+ | Remove `.verdaccio` folder | `rm -rf .verdaccio` |
113
+ | List all v5\* tags | `git tag -l "v5*"` |
114
+ | Remove specific tag | `git tag -d "v5.0.0-next.5"` |
115
+ | Set Verdaccio as the NPM registry | `npm config set registry http://localhost:4873` |
116
+ | Reset NPM registry | `npm config set registry https://registry.npmjs.org/` |
117
+ | Start Verdaccio | `yarn verdaccio:start` |
118
+ | Release to Verdaccio | `yarn release --type=verdaccio` | |
119
+ | Create a new Webiny project | `npx create-webiny-project@local-npm my-test-project --tag local-npm --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}` |
120
+ | Revert versioning commit | `git reset HEAD~ && git reset --hard HEAD` |
108
121
 
109
122
  ## Troubleshooting
110
123
 
@@ -112,18 +125,23 @@ Once you're done, do the following:
112
125
 
113
126
  This is probably because of one of the Yarn package caching mechanisms.
114
127
 
115
- Yarn has two levels of cache - local and shared.
128
+ Yarn has two levels of cache - local and shared.
116
129
 
117
- When you install a package, it gets cached in the local cache folder (located in your project), and in the shared cache folder. This makes it much faster when you're working on a couple of projects on your local machine, and you're pulling the same package in each. If the package doesn't exist in local cache, it will be pulled from shared cache.
130
+ When you install a package, it gets cached in the local cache folder (located in your project), and in the shared cache
131
+ folder. This makes it much faster when you're working on a couple of projects on your local machine, and you're pulling
132
+ the same package in each. If the package doesn't exist in local cache, it will be pulled from shared cache.
118
133
 
119
- On Windows, the shared cache folder should be located in: `C:\Users\{USER-NAME}\AppData\Local\Yarn`.
134
+ On Windows, the shared cache folder should be located in: `C:\Users\{USER-NAME}\AppData\Local\Yarn`.
120
135
  On Linux/Mac, the shared cache folder should be located in: `/Users/adrian/Library/Caches/Yarn`.
121
136
 
122
- In these folders, most probably, you'll also have the `\Berry\cache` folder. But, there were also cases where this folder did not exist.
137
+ In these folders, most probably, you'll also have the `\Berry\cache` folder. But, there were also cases where this
138
+ folder did not exist.
123
139
 
124
- Deleting the mentioned cache folders should help with the issue of still receiving old packages in your testing sessions.
140
+ Deleting the mentioned cache folders should help with the issue of still receiving old packages in your testing
141
+ sessions.
125
142
 
126
- With all of this being said, you can also try the [following command](https://yarnpkg.com/features/offline-cache#cleaning-the-cache):
143
+ With all of this being said, you can also try
144
+ the [following command](https://yarnpkg.com/features/offline-cache#cleaning-the-cache):
127
145
 
128
146
  ```bash
129
147
  yarn cache clean --mirror
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-webiny-project",
3
- "version": "5.37.3-beta.1",
3
+ "version": "5.37.3-beta.2",
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.37.3-beta.1",
16
+ "@webiny/telemetry": "5.37.3-beta.2",
17
17
  "chalk": "4.1.2",
18
18
  "execa": "5.1.1",
19
19
  "find-up": "5.0.0",
@@ -35,5 +35,5 @@
35
35
  "access": "public",
36
36
  "directory": "."
37
37
  },
38
- "gitHead": "59d377132f34c76cb198cd0f0eee211a56ca25b7"
38
+ "gitHead": "c454fc068c68c86bd817b21291e51c845296c15a"
39
39
  }