Removed bin/builder script. Updated .gitignore.

This commit is contained in:
Harry Hedger 2015-12-10 04:34:59 -05:00
parent 132adae735
commit 278495e27d
2 changed files with 2 additions and 62 deletions

3
.gitignore vendored
View file

@ -5,10 +5,11 @@ node_modules
dist/
lib/
website/db.json
website/*.log
website/node_modules/
website/public/
website/.deploy*/
website/src/_drafts
website/src/examples/uppy.js
website/src/examples/**/static/js/app.js

View file

@ -1,61 +0,0 @@
#!/bin/bash
# Setup
#######################################################
transformations="[ babelify ]"
toolpath="${1:-node_modules/.bin/browserify}"
toolname="$(basename "${toolpath}")"
if [ "${toolname}" = "node-sass" ]; then
srcExtension="scss"
dstExtension="css"
else
srcExtension="js"
dstExtension="js"
fi
if [ "${toolname}" = "watchify" ]; then
extraArgs="-t ${transformations} --ignore-watch=**/build/** --verbose"
elif [ "${toolname}" = "browserify" ]; then
extraArgs="-t ${transformations} --ignore-watch=**/build/** --verbose"
else
extraArgs=""
fi
bundleTarget="build/uppy.${dstExtension}"
# Individual files, built seperately
#######################################################
allSourceFiles=""
for src in $(find src -name "*.${srcExtension}" -type f); do
allSourceFiles="${allSourceFiles} ${src}"
dst="build/$(basename $(dirname ${src}))/$(basename ${src})"
echo "--> ${src} -> ${dst}"
# Argument should be `browserify`, or `node-sass`
if [ "${toolname}" = "node-sass" ]; then
"${toolpath}" "${src}" "${dst}" ${extraArgs}
else
"${toolpath}" "${src}" -o "${dst}" ${extraArgs}
fi
done
# All files in one bundle
#######################################################
echo "--> *.${srcExtension} -> ${bundleTarget}"
if [ "${toolname}" = "node-sass" ]; then
"${toolpath}" ${allSourceFiles} "${bundleTarget}" ${extraArgs}
else
"${toolpath}" ${allSourceFiles} -o "${bundleTarget}" ${extraArgs}
fi
# Install into examples
for path in $(find examples -maxdepth 1 -mindepth 1 -type d); do
exampleProject="$(basename "${path}")"
rsync \
-ai \
--exclude='.DS_Store' \
--exclude='.empty' \
build/ "examples/${exampleProject}/static/uppy"
done