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
Copy file name to clipboardExpand all lines: scripts.md
+21-20Lines changed: 21 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,55 +52,42 @@ This script builds all files needed to deploy plugins and examples to GitHub Pag
52
52
53
53
This script installs a beta version of Blockly, builds all files needed to deploy plugins and examples to GitHub Pages, then starts a local server with that content.
54
54
55
-
### `npm run publish:prepare`
56
-
57
-
This script will clone a copy of blockly-samples to a directory called `dist`,
58
-
run `npm ci`, build and test all plugins, and then log in to the npm publishing
59
-
service. It must be run before any of the other manual publishing commands are
60
-
run.
61
-
62
-
If any plugin fails to build or some tests fail, this script should fail. Since
63
-
nothing has been pushed to npm or github, you can simply correct the error and
64
-
try again.
65
-
66
55
### `npm run publish:manual`
67
56
68
-
This script assumes that you have already run `npm run publish:prepare`. It will
57
+
This script will first run `npm run publish:prepare`. It will
69
58
publish all of the changed plugins since the last release, using the `dist`
70
59
directory. It runs the lerna command that uses conventional commits to determine
71
60
a new version number for each plugin, and publishes the new versions to npm and
72
-
to a github release and tag. Plugins do not automatically build themselves
73
-
before publishing. You must have run `npm run publish:prepare` script ahead of
74
-
time for this reason.
61
+
to a github release and tag.
75
62
76
63
If there is some error with npm while running this command, you may end up in a
77
64
state where some plugins have been published to npm and not others, after lerna
78
65
has already tagged the new releases. You can recover from this state by fixing
79
-
the error, and then running `npm run publish:prepare` again followed by
66
+
the error, and then running either
80
67
`npm run publish:unpublishedOnly` or `npm run publish:force`.
81
68
82
69
### `npm run publish:unpublishedOnly`
83
70
84
-
This script assumes that you have already run `npm run publish:prepare`. It uses the `dist`
71
+
This script will first run `npm run publish:prepare`. It uses the `dist`
85
72
directory created in that script. It uses lerna to check each plugin to see if the version
86
73
in `package.json` matches the version on npm. If a version is not yet on npm, it will publish
87
74
that plugin without updating its version number. Thus, this script should only be used
88
75
after `lerna version` has been run in some form (most commonly, during a run of
89
76
`npm run publish:manual` that subsequently failed).
90
77
91
-
If this script fails, correct the error and re-run`npm run publish:prepare` and
78
+
If this script fails, correct the error and re-run
92
79
`npm run publish:unpublishedOnly`.
93
80
94
81
### `npm run publish:force`
95
82
96
-
This script assumes you have already run `npm run publish:prepare`. It will use lerna
83
+
This script will first run `npm run publish:prepare`. It will use lerna
97
84
to force publish all packages, even those that have not changed. You can use this
98
85
if you run into publishing problems to recover from error states, but you should prefer
99
86
to use `npm run publish:unpublishedOnly` if possible.
100
87
101
88
### `npm run publish:checkVersions`
102
89
103
-
This script assumes you have already run `npm run publish:prepare`. It will run `lerna
90
+
This script will first run `npm run publish:prepare`. It will run `lerna
104
91
version` to generate the new version numbers using conventional commits that would be
105
92
created during a full publish action, but it will not actually push the changes nor
106
93
create any tags. This can be used to check which plugins would be published and under
@@ -109,6 +96,20 @@ latest tags pulled. This is taken care of by the `publish:prepare` script.
109
96
110
97
## Other Scripts
111
98
99
+
### `npm run publish:prepare`
100
+
101
+
This script will clone a copy of blockly-samples to a directory called `dist`,
102
+
run `npm ci`, build and test all plugins, and then log in to the npm publishing
103
+
service. It must be run before any of the other manual publishing commands are
104
+
run.
105
+
106
+
If any plugin fails to build or some tests fail, this script should fail. Since
107
+
nothing has been pushed to npm or github, you can simply correct the error and
108
+
try again.
109
+
110
+
This script will be run automatically before any of the other publish scripts,
111
+
so you do not need to run it manually first.
112
+
112
113
### `npm run deploy:prepare`
113
114
114
115
This script prepares each of the plugins for deployment. In general, the script
0 commit comments