1.0.0-alpha.4 • Published 7 months ago
@hidoo/gulp-task-concat v1.0.0-alpha.4
@hidoo/gulp-task-concat
Task that concat files for gulp.
Installation
$ npm install --save-dev gulp@next @hidoo/gulp-task-concatUsage
for JavaScript:
import {task} from 'gulp';
import {concatJs} from '@hidoo/gulp-task-concat';
task('concat:js', concatJs({
src: [
'/path/to/js/a.js'
'/path/to/js/b.js'
'/path/to/js/c.js'
],
dest: '/path/to/dest'
}));for CSS:
import {task} from 'gulp';
import {concatCss} from '@hidoo/gulp-task-concat';
task('concat:css', concatCss({
src: [
'/path/to/css/a.css'
'/path/to/css/b.css'
'/path/to/css/c.css'
],
dest: '/path/to/dest'
}));API
concatJs
return javascript concat task
Parameters
optionsObject options (optional, default{})options.nameString task name (use as displayName) (optional, default'build:asset')options.srcArray[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) source pathoptions.destString destination pathoptions.filenameString destination filename (optional, default'bundle.js')options.suffixString suffix when compressed (optional, default'.min')options.bannerString license comments (optional, default'')
Examples
import { task } from 'gulp';
import { concatJs } from '@hidoo/gulp-task-concat';
task(
'concat:js',
concatJs({
name: 'js:deps',
src: ['/path/to/js/a.js', '/path/to/js/b.js', '/path/to/js/c.js'],
dest: '/path/to/dest',
filename: 'deps.js',
suffix: '.hoge',
banner: '/*! copyright <%= pkg.author %> * /\n',
compress: true
})
);Returns Function[Stream](https://nodejs.org/api/stream.html)
concatCss
return css concat task
Parameters
optionsObject options (optional, default{})options.nameString task name (use as displayName) (optional, default'build:asset')options.srcArray[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) source pathoptions.destString destination pathoptions.filenameString destination filename (optional, default'bundle.css')options.suffixString suffix when compressed (optional, default'.min')options.bannerString license comments (optional, default'')
Examples
import { task } from 'gulp';
import { concatCss } from '@hidoo/gulp-task-concat';
task(
'concat:css',
concatCss({
name: 'css:deps',
src: ['/path/to/css/a.css', '/path/to/css/b.css', '/path/to/css/c.css'],
dest: '/path/to/dest',
filename: 'deps.css',
suffix: '.hoge',
banner: '/*! copyright <%= pkg.author %> * /\n',
compress: true
})
);Returns Function[Stream](https://nodejs.org/api/stream.html)
Test
$ pnpm testLicense
MIT
1.0.0-alpha.4
7 months ago
1.0.0-alpha.3
8 months ago
1.0.0-alpha.2
8 months ago
1.0.0-alpha.1
2 years ago
1.0.0-alpha.0
2 years ago
0.19.0
5 years ago
0.18.0
5 years ago
0.17.0
5 years ago
0.16.0
5 years ago
0.15.0
6 years ago
0.14.1
6 years ago
0.14.0
6 years ago
0.13.0
6 years ago
0.12.0
6 years ago
0.11.0
6 years ago
0.10.0
6 years ago
0.9.0
7 years ago
0.8.4
7 years ago
0.8.3
7 years ago
0.8.2
7 years ago
0.8.1
7 years ago
0.8.0
7 years ago
0.7.0
7 years ago
0.6.2
7 years ago
0.6.1
7 years ago
0.6.0
7 years ago
0.5.0
7 years ago
0.4.0
7 years ago
0.3.0
7 years ago
0.2.1
7 years ago
0.2.0
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago