File tree Expand file tree Collapse file tree 3 files changed +29
-22
lines changed Expand file tree Collapse file tree 3 files changed +29
-22
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,13 @@ jobs:
109
109
- uses : actions/setup-node@v4
110
110
- uses : mwilliamson/setup-wabt-action@v3
111
111
with : { wabt-version: "1.0.30" }
112
+ - name : build demo
113
+ run : |
114
+ npm install
115
+ npm run dist
116
+ env :
117
+ NODE_OPTIONS : " --openssl-legacy-provider"
118
+ working-directory : ./wasm/demo
112
119
- name : build notebook demo
113
120
run : |
114
121
npm install
@@ -119,11 +126,11 @@ jobs:
119
126
working-directory : ./wasm/notebook
120
127
- name : Deploy demo to Github Pages
121
128
uses : peaceiris/actions-gh-pages@v4
122
- env :
123
- ACTIONS_DEPLOY_KEY : ${{ secrets.ACTIONS_DEMO_DEPLOY_KEY }}
124
- PUBLISH_DIR : ./wasm/demo/dist
125
- EXTERNAL_REPOSITORY : RustPython/demo
126
- PUBLISH_BRANCH : master
129
+ with :
130
+ deploy_key : ${{ secrets.ACTIONS_DEMO_DEPLOY_KEY }}
131
+ publish_dir : ./wasm/demo/dist
132
+ external_repository : RustPython/demo
133
+ publish_branch : master
127
134
128
135
release :
129
136
runs-on : ubuntu-latest
@@ -161,4 +168,4 @@ jobs:
161
168
--target="$tag" \
162
169
--generate-notes \
163
170
$PRERELEASE_ARG \
164
- bin/rustpython-release-*
171
+ bin/rustpython-release-*
Original file line number Diff line number Diff line change 12
12
"xterm" : " ^3.8.0"
13
13
},
14
14
"devDependencies" : {
15
- "@wasm-tool/wasm-pack-plugin" : " ^1.1.0" ,
16
- "clean-webpack-plugin" : " ^3.0.0" ,
17
- "css-loader" : " ^3.4.1" ,
18
- "html-webpack-plugin" : " ^3.2.0" ,
19
- "mini-css-extract-plugin" : " ^0.9.0" ,
20
- "raw-loader" : " ^4.0.0" ,
21
- "serve" : " ^11.0.2" ,
22
- "webpack" : " ^4.16.3" ,
23
- "webpack-cli" : " ^3.1.0" ,
24
- "webpack-dev-server" : " ^3.1.5"
15
+ "@wasm-tool/wasm-pack-plugin" : " ^1.7.0" ,
16
+ "css-loader" : " ^7.1.2" ,
17
+ "html-webpack-plugin" : " ^5.6.3" ,
18
+ "lezer-loader" : " ^0.3.0" ,
19
+ "mini-css-extract-plugin" : " ^2.9.2" ,
20
+ "webpack" : " ^5.97.1" ,
21
+ "webpack-cli" : " ^6.0.1" ,
22
+ "webpack-dev-server" : " ^5.2.0"
25
23
},
26
24
"scripts" : {
27
- "dev" : " webpack-dev-server -d " ,
25
+ "dev" : " webpack serve " ,
28
26
"build" : " webpack" ,
29
27
"dist" : " webpack --mode production" ,
30
28
"test" : " webpack --mode production && cd ../tests && pytest"
Original file line number Diff line number Diff line change 1
1
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
2
2
const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
3
3
const WasmPackPlugin = require ( '@wasm-tool/wasm-pack-plugin' ) ;
4
- const { CleanWebpackPlugin } = require ( 'clean-webpack-plugin' ) ;
5
4
6
5
const path = require ( 'path' ) ;
7
6
const fs = require ( 'fs' ) ;
@@ -12,6 +11,7 @@ module.exports = (env = {}) => {
12
11
output : {
13
12
path : path . join ( __dirname , 'dist' ) ,
14
13
filename : 'index.js' ,
14
+ clean : true ,
15
15
} ,
16
16
mode : 'development' ,
17
17
resolve : {
@@ -30,15 +30,14 @@ module.exports = (env = {}) => {
30
30
} ,
31
31
{
32
32
test : / \. ( w o f f ( 2 ) ? | t t f ) $ / ,
33
- use : {
34
- loader : 'file-loader' ,
35
- options : { name : 'fonts/[name].[ext]' } ,
33
+ type : 'asset/resource' ,
34
+ generator : {
35
+ filename : 'fonts/[name].[ext]' ,
36
36
} ,
37
37
} ,
38
38
] ,
39
39
} ,
40
40
plugins : [
41
- new CleanWebpackPlugin ( ) ,
42
41
new HtmlWebpackPlugin ( {
43
42
filename : 'index.html' ,
44
43
template : 'src/index.ejs' ,
@@ -58,6 +57,9 @@ module.exports = (env = {}) => {
58
57
filename : 'styles.css' ,
59
58
} ) ,
60
59
] ,
60
+ experiments : {
61
+ asyncWebAssembly : true ,
62
+ } ,
61
63
} ;
62
64
if ( ! env . noWasmPack ) {
63
65
config . plugins . push (
You can’t perform that action at this time.
0 commit comments