Files
ionic-framework/scripts/update-angular.sh
Andrew 4de112aa96 revert "Add all angular dependencies to update-angular.sh"
Addresses #3274.

These dependencies should not be in bower.json because they are not used
in Ionic.

Many people's build processes pull in all of these and
automatically bundle them into the browser.  If they do that, it will
break with the addition of `scenario` and `mocks`. Additionally, we
will add unneeded overhead with `aria`, `messages` and `resources`.
2015-03-12 14:09:06 -06:00

28 lines
663 B
Bash
Executable File

#!/bin/bash
ARG_DEFS=(
"--version=(.*)"
)
function run {
PROJECT_DIR=$SCRIPT_DIR/../
cd $SCRIPT_DIR/../config/lib/js/angular/
rm -rf *.js
wget https://code.angularjs.org/$VERSION/angular{,-sanitize,-animate,-resource,-aria,-messages}{.min.js,.js}
# # no min versions of mocks and scenario
wget https://code.angularjs.org/$VERSION/angular{-scenario,-mocks}.js
cd $PROJECT_DIR
echo "Setting bower.json angular versions to $VERSION"
replaceJsonProp "bower.json" "angular" "$VERSION"
replaceJsonProp "bower.json" "angular-animate" "$VERSION"
replaceJsonProp "bower.json" "angular-sanitize" "$VERSION"
}
source $(dirname $0)/utils.inc