You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: simplify and standardize package.json scripts and CI setup (#7069)
* chore(package.json): simplify site build
There were two separate scripts for doing the same thing.
* refactor(scripts): split up prepare-for-publish
No behavioural changes in this commit.
* chore: remove bizarre postinstall hook that builds
- It's nonstandard
- It's surprising
- Since we use `tsc` to build, it causes every CI check to fail if you have type errors
- It causes issues when rewriting git history
- It's a bit magical
* chore: remove leftover refs to ava
ava was removed a couple years ago
* ci: rename misleading jobs
They handle two kinds of benchmarks, only one of which is package size
* chore: split formating, linting, and unit testing
* ci: simplify workflow skipping for release branches
* chore(package.json): sort scripts
* chore(deps): add missing dependency on npm-run-all
We're using `run-s` which comes from this dep but it only happens to work because one of
our dependencies has a transitive dependency on `npm-run-all`.
IMO we should kill this, but for now this just adds the missing dep.
Note: npm-run-all2 is a maintained fork of the unmaintained npm-run-all
When debugging a project, it's super helpful to attach a debugger to the CLI. If you use VS Code, here's how you can do it:
94
+
When debugging a project, it's super helpful to attach a debugger to the CLI. If you use VS Code, here's how you can do
95
+
it:
95
96
96
97
1. Open this repository in VS Code.
97
-
2. Open a "JavaScript Debug Terminal" (e.g. by searching for it in the Command Palette (Shift-Cmd+P)). Every Node process that's opened in this terminal will have a debugger attached.
98
-
3. Place a breakpoint somewhere in the CLI. You will have to place them in the compiled `.js` files as opposed to the `.ts` files.
98
+
2. Open a "JavaScript Debug Terminal" (e.g. by searching for it in the Command Palette (Shift-Cmd+P)). Every Node
99
+
process that's opened in this terminal will have a debugger attached.
100
+
3. Place a breakpoint somewhere in the CLI. You will have to place them in the compiled `.js` files as opposed to the
101
+
`.ts` files.
99
102
4. In your JavaScript Debug Terminal, navigate to the project you'd like to debug.
100
103
5. Run `/path/to/netlify/cli/bin/run.js`. The debugger should be connecting automatically.
101
104
@@ -113,9 +116,10 @@ A good place to start is reading the base command README and looking at the comm
113
116
114
117
> If you’d like to learn more on how `netlify dev` works, check [here](./docs/netlify-dev.md)
115
118
116
-
117
119
### Adding or updating a command
118
-
If you're adding a new command or updating an existing one, make sure to also add docs for it by running `npm run site:build`.
120
+
121
+
If you're adding a new command or updating an existing one, make sure to also add docs for it by running
122
+
`npm run site:build`.
119
123
120
124
This will automatically generate documentation for you that will look like the following:
When adding a new command, you will also need to add it to the nav sidebar manually by adding it to the `navOrder` array in `site/src/_app.js`
139
+
When adding a new command, you will also need to add it to the nav sidebar manually by adding it to the `navOrder` array
140
+
in `site/src/_app.js`
137
141
138
142
### Updating our documentation
139
143
140
144
If documentation looks to be out of date, it is likely that the code for the command itself is not correct.
141
145
142
-
To update the documentation, update the code (rather than the markdown files) and then run `npm run docs` to sync the docs. To confirm that the changes to the docs are correct, run `cd site && npm run dev:start` to run the docs locally.
143
-
146
+
To update the documentation, update the code (rather than the markdown files) and then run `npm run site:build` to sync
147
+
the docs. To confirm that the changes to the docs are correct, run `cd site && npm run dev:start` to run the docs
148
+
locally.
144
149
145
150
### Testing
146
151
@@ -200,7 +205,8 @@ We actively welcome your pull requests.
200
205
201
206
## Releasing
202
207
203
-
Tag the 'release' pull request using the `automerge` label. This will merge the pull request on GitHub and publish the package to npm.
208
+
Tag the 'release' pull request using the `automerge` label. This will merge the pull request on GitHub and publish the
0 commit comments