Last active
May 11, 2018 05:55
-
-
Save njleonzhang/2bf540f65f8bcfa05c408ead3f09b60b to your computer and use it in GitHub Desktop.
concat all file in one
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
将本文件拷贝到你的目录下。 | |
安装依赖 | |
安装nodejs环境 | |
npm install gulp-cli -g | |
cnpm i gulp-concat gulp | |
修改gulp.src里的后缀名来指定你需要拼接文件的后缀名和要排除的文件。 | |
run命令 `gulp`, boom ~~~~ done. | |
*/ | |
const gulp = require('gulp') | |
const concat = require('gulp-concat') | |
gulp.task('default', () => { | |
return gulp.src(['./**/*.{js, scss, css, html, vue, json}', '!./dist/**']) // '!./node_modules/**' | |
.pipe(concat('all.txt')) | |
.pipe(gulp.dest('./concat/')) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment