Skip to content

Commit 44cd3d4

Browse files
committed
Change names of built library to paper-full.js, and have dist/paper.js link to it after build.sh was run.
1 parent 214db84 commit 44cd3d4

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

build/build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ then
3030
mkdir ../dist/
3131
fi
3232

33-
./preprocess.sh $MODE ../src/paper.js "-o '{ \"browser\": true }' -i '../src/constants.js'" ../dist/paper.js
33+
./preprocess.sh $MODE ../src/paper.js "-o '{ \"browser\": true }' -i '../src/constants.js'" ../dist/paper-full.js
3434
./preprocess.sh $MODE ../src/paper.js "-o '{ \"browser\": true, \"paperscript\": false }' -i '../src/constants.js'" ../dist/paper-core.js
3535
#./preprocess.sh $MODE ../src/paper.js "-o '{ \"node\": true }' -i '../src/constants.js'" ../dist/paper-node.js
36+
37+
# Remove the symbolic link and create a new one to the built library now
38+
if [ -f ../dist/paper.js ]
39+
then
40+
rm ../dist/paper.js
41+
fi
42+
ln -s paper-full.js ../dist/paper.js

build/load.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@
1313
# This script simply generates a symbolic link from dist/paper.js to src/load.js
1414
# which loads the library from separate sources through PrePro.
1515

16-
rm ../dist/paper.js
16+
if [ -f ../dist/paper.js ]
17+
then
18+
rm ../dist/paper.js
19+
fi
1720
ln -s ../src/load.js ../dist/paper.js

build/minify.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
#
1111
# All rights reserved.
1212

13-
../node_modules/.bin/uglifyjs ../dist/paper.js -o ../dist/paper-min.js -c unsafe=true -m -b ascii_only=true,beautify=false --comments /^!/
14-
../node_modules/.bin/uglifyjs ../dist/paper-core.js -o ../dist/paper-core-min.js -c unsafe=true -m --comments /^!/
13+
../node_modules/.bin/uglifyjs ../dist/paper-full.js -o ../dist/paper-full.min.js -c unsafe=true -m -b ascii_only=true,beautify=false --comments /^!/
14+
../node_modules/.bin/uglifyjs ../dist/paper-core.js -o ../dist/paper-core.min.js -c unsafe=true -m --comments /^!/

dist/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/paper-min.js
2-
/paper-server.js
31
/docs/
42
/serverdocs/
53
/paperjs.zip

0 commit comments

Comments
 (0)