mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Update build scripts to new approach for publishing.
This commit is contained in:
parent
44cd3d4ad8
commit
9bb6ec9ed7
2 changed files with 36 additions and 7 deletions
28
build/publish.sh
Executable file
28
build/publish.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
||||||
|
# http://paperjs.org/
|
||||||
|
#
|
||||||
|
# Copyright (c) 2011 - 2013, Juerg Lehni & Jonathan Puckey
|
||||||
|
# http://lehni.org/ & http://jonathanpuckey.com/
|
||||||
|
#
|
||||||
|
# Distributed under the MIT license. See LICENSE file for details.
|
||||||
|
#
|
||||||
|
# All rights reserved.
|
||||||
|
|
||||||
|
echo "Building paper.js"
|
||||||
|
./build.sh
|
||||||
|
echo "Minifying paper.js"
|
||||||
|
./minify.sh
|
||||||
|
echo "Commiting Version"
|
||||||
|
# Add all changed files in dist
|
||||||
|
git add -u ../package.json
|
||||||
|
git add -u ../dist
|
||||||
|
# Extract the paper.js version from package.json:
|
||||||
|
VERSION=$(node -e "
|
||||||
|
process.stdout.write(require('../package.json').version)
|
||||||
|
")
|
||||||
|
# Commit
|
||||||
|
git commit -m "Update version to v$VERSION."
|
||||||
|
# Tag
|
||||||
|
git tag "v$VERSION"
|
15
build/zip.sh
15
build/zip.sh
|
@ -21,17 +21,18 @@ BASE=../..
|
||||||
# Copy license over
|
# Copy license over
|
||||||
cp $BASE/LICENSE.txt .
|
cp $BASE/LICENSE.txt .
|
||||||
# Make library folder and copy paper.js there
|
# Make library folder and copy paper.js there
|
||||||
mkdir lib
|
mkdir dist
|
||||||
cp $BASE/dist/paper.js lib
|
cp $BASE/dist/paper-full.js dist
|
||||||
cp $BASE/dist/paper-min.js lib
|
cp $BASE/dist/paper-full.min.js dist
|
||||||
cp $BASE/dist/paper-core.js lib
|
cp $BASE/dist/paper-core.js dist
|
||||||
cp $BASE/dist/paper-core-min.js lib
|
cp $BASE/dist/paper-core.min.js dist
|
||||||
# Also include stats sinsce some examples use it
|
# Also include stats sinsce some examples use it
|
||||||
|
mkdir lib
|
||||||
cp $BASE/lib/stats.js lib
|
cp $BASE/lib/stats.js lib
|
||||||
# Copy examples over
|
# Copy examples over
|
||||||
cp -r $BASE/examples .
|
cp -r $BASE/examples .
|
||||||
# Replace ../../dist/ with ../../lib/ in each example
|
# Replace dist/paper.js with dist/paper-full.js in each example
|
||||||
find examples -type f -print0 | xargs -0 perl -i -pe 's/\.\.\/\.\.\/dist\//\.\.\/\.\.\/lib\//g'
|
find examples -type f -print0 | xargs -0 perl -i -pe 's/dist\/paper\.js/dist\/paper-full\.js/g'
|
||||||
# Copy docs over
|
# Copy docs over
|
||||||
cp -r $BASE/dist/docs .
|
cp -r $BASE/dist/docs .
|
||||||
# Zip the whole thing
|
# Zip the whole thing
|
||||||
|
|
Loading…
Reference in a new issue