Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wax
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
wax
Commits
bb48182b
Verified
Commit
bb48182b
authored
3 months ago
by
Mateusz Tyszczak
Browse files
Options
Downloads
Patches
Plain Diff
Apply terser on emscripten-generated JS code to make errors easier to read
parent
3889ee08
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ts/rollup.config.js
+49
-12
49 additions, 12 deletions
ts/rollup.config.js
ts/wasm/build_wasm_wax.sh
+0
-4
0 additions, 4 deletions
ts/wasm/build_wasm_wax.sh
with
49 additions
and
16 deletions
ts/rollup.config.js
+
49
−
12
View file @
bb48182b
...
...
@@ -6,6 +6,55 @@ import terser from '@rollup/plugin-terser';
import
copy
from
'
rollup-plugin-copy
'
;
export
default
[
{
input
:
'
wasm/lib/build_wasm/wax.web.js
'
,
output
:
{
format
:
'
es
'
,
file
:
'
wasm/dist/bundle/wax.web.js
'
},
plugins
:
[
replace
({
delimiters
:
[
''
,
''
],
values
:
{
'
wax.web.wasm
'
:
'
wax.common.wasm
'
},
preventAssignment
:
true
}),
terser
({
format
:
{
inline_script
:
false
,
comments
:
false
,
max_line_len
:
100
}
})
]
},
{
input
:
'
wasm/lib/build_wasm/wax.node.js
'
,
output
:
{
format
:
'
es
'
,
file
:
'
wasm/dist/bundle/wax.node.js
'
},
plugins
:
[
copy
({
targets
:
[{
src
:
[
'
wasm/lib/build_wasm/wax.common.wasm
'
],
dest
:
'
wasm/dist/bundle
'
}]
}),
replace
({
delimiters
:
[
''
,
''
],
values
:
{
'
wax.node.wasm
'
:
'
wax.common.wasm
'
},
preventAssignment
:
true
}),
terser
({
format
:
{
inline_script
:
false
,
comments
:
false
,
max_line_len
:
100
}
})
]
},
// Generate .JS bundles for each environment
{
input
:
'
wasm/dist/lib/detailed/index.js
'
,
...
...
@@ -14,18 +63,6 @@ export default [
file
:
'
wasm/dist/bundle/detailed/index.js
'
},
plugins
:
[
copy
({
targets
:
[
{
src
:
[
'
wasm/lib/build_wasm/wax.common.wasm
'
,
'
wasm/lib/build_wasm/wax.node.js
'
,
'
wasm/lib/build_wasm/wax.web.js
'
],
dest
:
'
wasm/dist/bundle
'
}
]
}),
replace
({
delimiters
:
[
''
,
''
],
values
:
{
...
...
This diff is collapsed.
Click to expand it.
ts/wasm/build_wasm_wax.sh
+
0
−
4
View file @
bb48182b
...
...
@@ -50,8 +50,4 @@ else
cmake
--install
"
${
BUILD_DIR
}
"
--component
wax_wasm_web_runtime
--prefix
"
${
EXECUTION_PATH
}
/ts/wasm/lib/build_wasm"
cmake
--install
"
${
BUILD_DIR
}
"
--component
wax_wasm_web_dts
--prefix
"
${
EXECUTION_PATH
}
/ts/wasm/lib/build_wasm"
# TODO: Maybe find emcc options to set a WASM output name
sed
-i
's/wax.node.wasm/wax.common.wasm/g'
"
${
EXECUTION_PATH
}
/ts/wasm/lib/build_wasm/wax.node.js"
sed
-i
's/wax.web.wasm/wax.common.wasm/g'
"
${
EXECUTION_PATH
}
/ts/wasm/lib/build_wasm/wax.web.js"
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment