Gulp CEX Utils
This module is a utility tool for EveryMatrix's Component Explorer
It provides some basic functionality like fetching the list of components, main files and others
how to install
- to install the module
npm install --save gulp-cex-utils
- if you use coffescript install coffee-loader
npm install --save coffee-loader
- if you use typescript install typescript-loader
npm install --save typescript-loader
- if you use es6 install traceur-loader (note: file extensions for es6 should be .es6.js)
npm install --save traceur-loader
how to use:
to use the gulp module create a Gulpfile.js with the fallowing content:
var gulp = require('gulp');
var config = {
paths: {
src: 'app'
}
};
require('gulp-cex-utils').loadGulp(gulp, config);
default configuration
var defaultSettings = {
paths:{
tmp: '.tmp',
dist: 'dist',
src: 'src',
scripts: 'scripts',
styles: 'styles',
images: 'img',
test: 'tests',
views: 'views',
assets:[
'src/{,**/}*.*',
'!src/{,**/}*.{css,js,coffee,html,htm,scss,map,json,md,log,d.ts,xml}',
'!src/bower_components/**/*.*'
],
},
fileNames:{
stylesIndex: 'main.scss',
scriptsIndex: 'app.coffee',
},
webPackConfig: {
module: {
loaders: [
{ test: /\.coffee$/, loader: "coffee-loader" },
{ test: /\.ts$/, loader: "typescript" },
{ test: /\.es6\.js$/, loader: 'traceur?sourceMaps' }
]
},
devtool: '#inline-source-map',
resolve: {
extensions: ["", ".web.coffee", ".web.js", ".coffee", ".js", '.ts']
},
plugins: [
new webpack.ResolverPlugin([
new webpack.ResolverPlugin.ModuleAliasPlugin(cexComponentsJson)
]),
new ngAnnotatePlugin({
add: true
})
]
}
}