mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
Added gzip support #82
This commit is contained in:
parent
3b43119d93
commit
c52fc549e1
6 changed files with 20 additions and 9 deletions
13
build/build.js
Normal file
13
build/build.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
({
|
||||
baseUrl: "../app",
|
||||
paths: {
|
||||
"screenfull": "../node_modules/screenfull/dist/screenfull",
|
||||
"socketio": "../node_modules/socket.io/node_modules/socket.io-client/dist/socket.io"
|
||||
},
|
||||
name: "../client",
|
||||
out: "client.min.js",
|
||||
onBuildRead: function (moduleName, path, contents) {
|
||||
var contents = contents.replace(/\" \+ GLOBALS.context \+ \"/g, "Client");
|
||||
return contents;
|
||||
}
|
||||
})
|
||||
9
build/build.sh
Executable file
9
build/build.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
if [ -d "build" ]; then
|
||||
cd build
|
||||
echo "\\033[1;36mcompiling client scripts...\\033[0m"
|
||||
rm -f "client.min.js.gz"
|
||||
../node_modules/requirejs/bin/r.js -o build.js > /dev/null \
|
||||
&& gzip --keep client.min.js && echo "\\033[1;32mdone.\\033[0m"
|
||||
cd ..
|
||||
fi
|
||||
181
build/client.min.js
vendored
Normal file
181
build/client.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
build/client.min.js.gz
Normal file
BIN
build/client.min.js.gz
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue