hf-lentil
v1.4.0
Published
Smart and modular gulp wrapper
Downloads
4
Readme
Lentil
Smart and modular gulp wrapper
How to install?
$ npm install --save-dev hf-lentil
What is Lentil?
Lentil is a tool that runs next to gulp to make setting up your new projects less painful. It will simply compile your scripts out of the box! It will use all the popular compiling implementations for your website's frontend assets (ingredients). Currently it will compile plain JS, sass or scss and angular apps (templateCache
is also included). Write us an issue or a Pull Request of you feel like something is missing!
Why use Lentil?
Lentil is built so that a project, or several projects keep the same compiling and conventions. It is very easy to setup and it's using a modular approach. This will simplify the ability to create several modules, without having to worry about an ever growing gulpfile
all that will be growing is your file tree!
Documentation
For Lentil's API docs see the documentation page.
Example gulpfile.js
// Require the lentil package from the NPM package manager
var Lentil = require('hf-lentil');
// Initialize the Lentil object with a config object that will take of the rest
var lentil = new Lentil({
paths: {
modules: __dirname + '/modules', // The path to where your different modules
libs: __dirname + '/libs', // Where are your libs situated (for SASS includes)
dist: __dirname + '/dist', // Where do you want the compiled files to end up
tmp: __dirname + '/../tmp', // Location for the short lived files
rootPrefix: '/' // Prefix for the mounting point for this project on the root of the webserver (e.g. /src/ or /assets/)
},
tasks: { // Here we map the tasks with the folders inside the module
'js': 'js', // So the plain JS files will be in the js folder
'app': 'angular', // So the angular files will be in the folder named app
'sass': 'sass'
},
libs: { // Here we define our different libs files
'base': [
__dirname + '/libs/sugar/release/sugar-full.development.js',
__dirname + '/libs/jquery/dist/jquery.js',
__dirname + '/libs/angular/angular.js'
],
'touch': [
__dirname + '/libs/angular-touch/angular-touch.js'
]
},
karma: { // Define the config for Karma here
files: [
'./libs/angular-mocks/angular-mocks.js'
]
},
plugins: { // Configure the different plugins that are used
eslint: require('./eslintconfig.json') // For example ESLint
}
});
// Start the compiler!
lentil.start();