node package manager

spark-build

SPARK Build

NOTE: The project is currently in beta state.

SPARK build provides aa set of common gulp tasks (etc. different gulp tasks) for building SPARK projects.

More Information & full documentation: http://www.k15t.com/display/SPARK

Installing

$ npm install spark-build

Usage

Basic usage as part of your project gulp file:

var sparkBuild = require('spark-build');
 
sparkBuild({
    moduleName: '<module-name>',
    resourcePath: '<resource-path>',
    paths: {
        'lib': {
            //The CSS files of the libraries 
            'styles': {
                'prod': [],
                'dev':  []
            },
            'scripts': {
                //The js files of the libraries that should be delivered with the app (not minified!) 
                'dev':  [],
                //The js files of the libraries that should be delivered with the app (minified!) 
                'prod': [],
                //The js files of the libraries that must be provided to run tests 
                'test': []
            },
            'assets':   []
        },
        'app': {
            'index': 'src/index.html',
            'styles':   [],
            'scripts':  [],
            'partials': [],
            'assets':   [],
            'tests':    [],
            'libs':     []
        }
    }
});
 

The configuration paths.app.libs is optional if you don't have multiple web applications in one project and no library you want to share between them, otherwise enter the path to the library you want to share. The whole directory will be copied to the current web application under app/libs.

After you added the required configuration you can start the gulp build as usual:

$ gulp default

or

$ gulp watch

Options

Following configurations can be customized as well if needed:

  • buildTargetDir (default '../../../../target')
  • karmaPort (default '9876')
  • karmaConfigFile (default configuration under build)
  • karmaConfigFileTemplate (default configuration under build)
  • jscsrc (Rule set to enforce best practices for java script, default configuration under build)

NOTE: The usage of Karam requires to add the desired dependencies to your project package.json!

Tips

The provided gulp task are split in different files according to what the task is intended for (e.g. cleanup.js, tests.js, ...).

This give you the opportunity to setup your own tasks based on the existing or in combination with your project specific gulp tasks.

License

Licensed under The MIT License (MIT).