makeitcheaper-journey-assets v1.1.0
README
This repository contains all assets which are used in the energy and insurance journeys, like:
- JavaScript custom scripts
- stylesheets
Everything is stored on npmjs. The package is called makeitcheaper-journey-assets.
Installation
If you want to include this package in your project, just run:
$ npm install makeitcheaper-journey-assetsand import application.js and application.css files into your application:
import 'mic-journey-assets/assets/javascripts/application.js'
import 'mic-journey-assets/assets/stylesheets/application.css'Development
Make sure that you have already installed npm on your computer. Then, just install all plugins by running:
$ npm installCSS Style guide
For stylesheets, we use BEM (Block-Element-Modifier) concept. You can find more about it here.
CSS
First of all, make sure that you don't modify the assets/stylesheets/application.css file manually. It's generated automatically by gulp. You can do it using by running this command:
$ npm run buildIf you want to live watch for any changes, run:
$ npm run watchAfter every change in any SCSS file, everything will be recompiled and written to the application.css.
JavaScript
All scripts are combined into one script called application.js inside the assets/javascript folder.
You can do it by running:
$ npm run buildPublishing to npmjs.org
If you want to publish your package to npmjs.org, make sure that your assets are up to date and builded. To do it, just run:
$ npm run buildThen you just need to push everything to npm, by calling:
$ npm publish --access public