File tree 5 files changed +8
-8
lines changed
.github/actions/install-dependencies
5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 31
31
path : |
32
32
node_modules
33
33
packages/*/node_modules
34
+ packages/*/src/generated
34
35
key : ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
35
36
- if : steps.restore-node-modules-cache.outputs.cache-hit != 'true'
36
37
name : Install NPM dependencies
43
44
path : |
44
45
node_modules
45
46
packages/*/node_modules
47
+ packages/*/src/generated
46
48
key : ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
Original file line number Diff line number Diff line change 14
14
"build" : " npm run clean && webpack" ,
15
15
"clean" : " rimraf ./build ./dist" ,
16
16
"deploy" : " touch build/.nojekyll && gh-pages -t -d build -m \" [skip ci] Build for $(git log --pretty=format:%H -n1)\" " ,
17
- "prepublish " : " node scripts/prepublish .mjs" ,
17
+ "prepare " : " node scripts/prepare .mjs" ,
18
18
"prune" : " ./prune-gh-pages.sh" ,
19
19
"i18n:push" : " tx-push-src scratch-editor interface translations/en.json" ,
20
20
"i18n:src" : " rimraf ./translations/messages/src && babel src > tmp.js && rimraf tmp.js && build-i18n-src ./translations/messages/src ./translations/" ,
Original file line number Diff line number Diff line change 1
1
// From the NPM docs:
2
2
// "If you need to perform operations on your package before it is used, in a way that is not dependent on the
3
- // operating system or architecture of the target system, use a prepublish script."
3
+ // operating system or architecture of the target system, use a prepare script."
4
4
// Once this step is complete, a developer should be able to work without an Internet connection.
5
5
// See also: https://docs.npmjs.com/cli/using-npm/scripts
6
6
@@ -100,7 +100,7 @@ const downloadMicrobitHex = async () => {
100
100
fs . writeFileSync (
101
101
absoluteGeneratedFile ,
102
102
[
103
- '// This file is generated by scripts/prepublish .mjs' ,
103
+ '// This file is generated by scripts/prepare .mjs' ,
104
104
'// Do not edit this file directly' ,
105
105
'// This file relies on a loader to turn this `require` into a URL' ,
106
106
`module.exports = require('${ requirePath } ');` ,
@@ -110,13 +110,13 @@ const downloadMicrobitHex = async () => {
110
110
console . info ( `Wrote ${ relativeGeneratedFile } ` ) ;
111
111
} ;
112
112
113
- const prepublish = async ( ) => {
113
+ const prepare = async ( ) => {
114
114
await downloadMicrobitHex ( ) ;
115
115
} ;
116
116
117
- prepublish ( ) . then (
117
+ prepare ( ) . then (
118
118
( ) => {
119
- console . info ( 'Prepublish script complete' ) ;
119
+ console . info ( 'Prepare script complete' ) ;
120
120
process . exit ( 0 ) ;
121
121
} ,
122
122
e => {
Original file line number Diff line number Diff line change @@ -456,7 +456,6 @@ build_scratch_gui () {
456
456
cd ./monorepo.out/packages/scratch-gui
457
457
use_node_version_from_nvmrc
458
458
process_workspace_webpack_config " ." " webpack.config.js"
459
- npm run prepublish
460
459
npm run build
461
460
cd -
462
461
}
Original file line number Diff line number Diff line change @@ -15,6 +15,5 @@ npm run build
15
15
cd -
16
16
17
17
cd ./packages/scratch-gui
18
- npm run prepublish
19
18
NODE_ENV=production npm run build
20
19
cd -
You can’t perform that action at this time.
0 commit comments