glueify

0.1.7 • Public • Published

glueify

A wrapper to preprocess, minify and concat .js and .css files

NOTICE:

This package is no longer a grunt plugin, as it was before! I thought, i want to create first a programm that works completly before i build a grunt plugin with all the features that are planned. Therefore this is ONLY a wrapper. Grunt plugin is on the roadmap though.

Setup

To setup glueify install it via the npm. Thats easy and effective.

npm install glueify

Usage

There are basically two options how to use glueify.

The first option is to easy give a source, a target and an output filename.

var config = {
    src: './demo',
    dest: './demo',    
    output: 'demo'
}

When you now call:

index.js(config);
index.css(config);

All .css and all .js files that could be found in the source directory are converted to ONE .min.css and to ONE .min.js into the dest directory. The filename of the compressed file is the one defined in the ouput config key.

The more advanced method to call glueify is with the following configuration.

var config = {
    src: './demo',
    dest: './demo',
    dirwise: true
}

When you now call:

index.js(config);
index.css(config);

The compiler will run through all sub directories in the source dir and will create for EACH sub dir a subdirname.min.js and a subdirname.min.css in the source dir. This is a functionality for bigger projects that store the javascript and css in "module" directories to keep their frontend assets structured.

Experimental

SASS

you can try to use the sass option

...
sass: true,
...

This will try to convert not your .css but your .scss files into ONE .compiled.css into the dest directory. Because there are some problems with imports it isn't stable though.

Roadmap

  • full SASS compatibility
  • grunt plugin
  • (gulp plugin ?)

Package Sidebar

Install

npm i glueify

Weekly Downloads

1

Version

0.1.7

License

MIT

Last publish

Collaborators

  • troublete