Skip to content

Commit

Permalink
Added build procces using gulp to minify jmfcool.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfcool committed Mar 22, 2022
1 parent 2c0d5a8 commit 65a0586
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion controller.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { jmfcool } from './jmfcool.js';
import { jmfcool } from './jmfcool.min.js';

jmfcool.init()
{
Expand Down
16 changes: 16 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import gulp from 'gulp';
import minify from 'gulp-minify';

gulp.task('compress', function(exit)
{
gulp.src('jmfcool.js')
.pipe(minify({
ext:{
min:'.min.js'
}
}))
.pipe(gulp.dest('./'))
exit();
});

gulp.task('build', gulp.parallel('compress'));
1 change: 1 addition & 0 deletions jmfcool.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"@babel/core": "^7.17.8",
"@babel/preset-env": "^7.16.11",
"babel-jest": "^27.5.1",
"gulp": "^4.0.2",
"gulp-cli": "^2.3.0",
"gulp-minify": "^3.1.0",
"jest": "^27.5.1"
},
"scripts": {
Expand Down

0 comments on commit 65a0586

Please sign in to comment.