README
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-assets
and 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 install
CSS 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 build
If you want to live watch for any changes, run:
$ npm run watch
After 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 build
Publishing 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 build
Then you just need to push everything to npm, by calling:
$ npm publish --access public