baltimorecountymd.gov Assets
Assets used on the Baltimore County Website
Building Files for Distribution
Setup
You will need to do these steps the first time you setup the project.
npm install
- Clone this repository
- Install Node
- Install gulp
- Open terminal or command prompt to the root of your local repository
- Run
npm install
to install all local dependencies.
- Run
npm install -g karma-cli
to install the Karma command-line interface for running unit tests.
- Run
npm install phantomjs-prebuilt karma-phantomjs-launcher --save-dev
to install the PhantomJS headless browser for unit testing.
Build
gulp
Builds the app for dev and or production to the dist
folder. It does the following:
Note: When building for production ensure any constants files are pointing to production values.
- Compile and minify all sass stylesheets to css and place them in the 'dist/css' folder
- Create Homepage and Template js files into the 'dist/js' folder
- Copy and minify Homepage and Template js files into the 'dist/js' folder
- Copy and minify page-specific js files into the 'dist/js/page-specific' folder
*You may need to configure node for proxy, here's how.
Run Unit Tests - Karma
- Open terminal or command prompt to the root of your local repository
- Run the
karma start
command
Pushing Code To Dev/Test
- Make changes to any files in js root or CSS root
- Commit changes with comment specific to bug fix
- Run Gulp
- Copy files to Site Executive from your dist folder to corresponding files.
i.e. Made Changes to BaltCoGoReporterCtrl.js => gulp => dist\baltcogp-reporter.js is copied over to SE
i.e. Modified homepage.scss page => gulp => dit\homepage.min.css is copied over to SE