/usr/local/sbin/bs3ng
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#!/bin/bash if [ -z "$1" ] then echo "usage: $0 <projectname>" exit 1 fi ng new $1 --style=scss cd $1 npm install jquery bootstrap-sass --save cat > src/_variables.scss <<EOF \$icon-font-path: '../node_modules/bootstrap-sass/assets/fonts/bootstrap/'; EOF cat > src/styles.scss <<EOF @import 'variables'; @import '../node_modules/bootstrap-sass/assets/stylesheets/_bootstrap'; EOF sed -i 's~"scripts": \[\],~"scripts": \[\n\t"../node_modules/jquery/dist/jquery.slim.js",\n\t"../node_modules/bootstrap-sass/assets/javascripts/bootstrap.js"\n\t],~' .angular-cli.json ng serve -o exit 0 |