gulp-sms

0.0.4 • Public • Published

SMS Gulp Wrapper

Requirement

# If you want to use gulp locally in each project 
npm install gulp -g
npm install gulp gulp-sms
 
# If you want to use gulp globally 
npm install gulp gulp-sms -g
npm link gulp gulp-sms

Usage

Write your gulpfile.js as below.

require('gulp-sms')(require('gulp'), [
    {
        type: 'less',
        paths: {
            include: [
                __dirname + '/path/to/css/*.less'
            ],
            exclude: [
                __dirname + '/path/to/css/_*.less'
            ],
            watching: [
                __dirname + '/path/to/css/*.less'
            ]
        },
        dest: {
            type: 'normal',
            dir: __dirname + '/path/to/css'
        }
    }
]);

Less Configuration

Normal Configuration

The configuration will convert less files listed in paths.include, and output each css file into the specific directory dest.dir.

The files listed in the paths.exclude will not be converted by less compiler.

var configs = [
    {
        type: 'less',
        paths: {
            include: [
                __dirname + '/path/to/css/*.less'
            ],
            exclude: [
                __dirname + '/path/to/css/_*.less'
            ],
            watching: [
                __dirname + '/path/to/css/*.less'
            ]
        },
        dest: {
            type: 'normal',
            dir: __dirname + '/path/to/css'
        }
    }
];

Single File Configuration

The configuration will convert less files listed in paths.include, and output only one css file dest.filename in the specific directory dest.dir.

The files listed in the paths.exclude will not be converted by less compiler.

var configs = [
    {
        type: 'less',
        paths: {
            include: [
                __dirname + '/path/to/css/*.less'
            ],
            exclude: [
                __dirname + '/path/to/css/_*.less'
            ],
            watching: [
                __dirname + '/path/to/css/*.less'
            ]
        },
        dest: {
            type: 'single-file',
            dir: __dirname + '/path/to/css',
            filename: 'screen.css'  // use only in type 'single-file'
        }
    }
];

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i gulp-sms

    Weekly Downloads

    2

    Version

    0.0.4

    License

    MIT

    Last publish

    Collaborators

    • smstw