Ready for deploy - rosalsm/TIY-GitHub GitHub Wiki

This is the content of a build file that you can run with zsh build before deploy in order to clean all folders and files in dist (which is the directory we use for deploy, the one is going to be public)

In Firebase I will go forward these steps: firebase init (public direc dist), firebase deploy and firebase open

echo 'Step 0: Kill ALL THE THINGS... in `dist/`'

rm -rf dist/*

echo 'Step 1: Copy all the HTML'
cp src/index.html dist/
mkdir dist/partials/
cp -r src/partials dist/

echo 'Step 2: Build all the Sass into CSS!'
mkdir dist/css/
npm run sass
cp src/css/main.css dist/css/

echo 'Step 3: Copy all the JS'
mkdir -p dist/js && cp -r src/js dist/

echo 'Step 4: Copy all the `bower_components/`!'

echo 'Step 4a: Normalize the CSS...'
mkdir -p dist/bower_components/normalize-css/
cp bower_components/normalize-css/normalize.css dist/bower_components/normalize-css/normalize.css

mkdir -p dist/bower_components/jquery/dist/
cp bower_components/jquery/dist/jquery.js dist/bower_components/jquery/dist/jquery.js

mkdir -p dist/bower_components/angular/
cp bower_components/angular/angular.js dist/bower_components/angular/angular.js

mkdir -p dist/bower_components/angular-route/
cp bower_components/angular-route/angular-route.js dist/bower_components/angular-route/angular-route.js

npm run start:dev