18 lines
411 B
Bash
18 lines
411 B
Bash
#!/usr/bin/env bash
|
|
|
|
dist_dir="dist";
|
|
entrance_file=lib/index.js
|
|
output_file=$dist_dir/xss.js
|
|
output_mini_file=$dist_dir/xss.min.js
|
|
|
|
mkdir $dist_dir
|
|
|
|
echo "browserify..."
|
|
node ./node_modules/browserify/bin/cmd.js $entrance_file > $output_file
|
|
echo "output $output_file"
|
|
|
|
echo "minify..."
|
|
node ./node_modules/uglify-js/bin/uglifyjs $output_file -o $output_mini_file
|
|
echo "output $output_mini_file"
|
|
|
|
echo "done."
|