branding_sass_compiler v1.0.6
Branding CSS Generator
This is a NPM module that takes the branding service env, a file with a list of signature ids and the base path to the main scss files and returns the path to all the scss files generated by the module. The CSS Generator reads the signature ids file and fetch the branding information from the branding service for each sig_id. Then, the module creates an intermediate scss file containing the colors variables and finally creates a scss file for each signature id by importing the variables files into the main scss file.
Parameters
brandingServiceEnv | String ('dev', 'qa' or 'prod') | Indicates which branding service to reach
sigIdFile | String | Indicates the path for the text file containing the signature ids. There must be only one sig id per line in the file
stylesBasePath | String | Indicates the path for the project's scss files. The main app.scss
file must be in the root of the directory
Install
Install the npm module: npm install branding_sass_compiler --save-dev
Basic Usage
In your gulfile.js
:
var branding = require('branding_sass_compiler');
// Your sass compiling task
gulp.task('sass', function () {
return gulp.src(branding('dev', 'path/to/sig_ids.txt', 'path/to/scss'))
.pipe($.sass())
.pipe(gulp.dest('./dest/path/to/css/'))
;
});