Debian Codegraph @

test/samples/transpile-concat-lowres/build.sh

raw
1 #!/bin/bash
2 DIR="$(dirname $0)"
3 NODE_BIN=`npm bin`
4 NODE_MODULES=`npm prefix`/node_modules
5
6 rm "$DIR"/files/*.js*
7
8 if [ ! -f "$NODE_BIN/babel" ]; then
9 npm install --no-save @babel/cli @babel/preset-env
10 fi
11 "$NODE_BIN/babel" "$DIR/files" --config-file "./$DIR/babel.config.js" --source-maps -d "$DIR/files"
12
13 if [ ! -d "$NODE_MODULES/magic-string" ]; then
14 npm install --no-save magic-string
15 fi
16
17 node "$DIR/build.js"
18 npx prettier "$DIR/files/*.map" --parser json --write