0.0.2 • Published 3 years ago
@tgrwb/gulp-copy v0.0.2
@tgrwb/gulp-version
Copies other files to the dist directory
install
npm i @tgrwb/gulp-copy
gulpfile.js
const copy = require('@tgrwb/gulp-copy');
tgrwb.gulp.js (optional)
module.exports = {
dirSrc: 'src',
dirDist: 'dist'
};
tgrwb.gulp.copy.js (optional)
const path = require('path');
module.exports = (baseParams)=>{
const {dirSrc, dirDist} = baseParams;
return {
globs: `${dirSrc}/**/.tgrwb.copy.json`,
rename: [ // rename file path
{pattern: /(?:^|.*\/)_([^\/]+(?:\/|$))/, replacement: '$1'}
],
dist: path.join(dirDist)
};
};
Usage
const copy = require('@tgrwb/gulp-copy');
exports.copy = copy;
or
const {series, parallel} = require('gulp');
const copy = require('@tgrwb/gulp-copy');
exports.build = series(
parallel(
...,
...,
...
),
parallel(
...,
...,
copy,
...
)
);
0.0.2
3 years ago