Last active
August 21, 2020 15:26
-
-
Save andrei99/4ab77e025ba3ea677113d00b7458de83 to your computer and use it in GitHub Desktop.
Gulp
This file contains 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
//install global | |
npm install --global gulp-cli | |
//in project | |
npm init /* create package.json */ | |
npm install gulp --save-dev |
This file contains 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
download node js | |
install global: npm i gulp -g | |
install project: | |
->npm init | |
->npm i gulp --save-dev | |
install bower | |
->npm i -g bower | |
->install git | |
->create file .bowerrc | |
{ | |
"directory": "app/libs/" | |
} | |
min-css, min-js | |
->npm i gulp-concat gulp-uglifyjs --save-dev | |
install libs | |
->bower install jquery.form-styler | |
->bower install simplemde | |
<!-- NEW PROJECT --> | |
->npm i gulp | |
->npm i | |
->bower i jquery magnific-popup slick-carousel bootstrap-sass-grid jquery-mask-plugin jquery.form-styler nouislider wowjs wnumb |
This file contains 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
bower i jquery magnific-popup slick-carousel bootstrap-sass-grid jquery-mask-plugin jquery.form-styler nouislider | |
//libs.sass | |
@import "app/libs/magnific-popup/dist/magnific-popup" | |
@import "app/libs/bootstrap-sass-grid/sass/bootstrap-sass-grid" | |
@import "app/libs/slick-carousel/slick/slick.scss" | |
@import "app/libs/jquery.form-styler/dist/jquery.formstyler" | |
@import "app/libs/nouislider/distribute/nouislider" | |
//gulpfile | |
//concat & uglify | |
gulp.task('scripts', function () { | |
return gulp.src([ | |
'app/libs/jquery/dist/jquery.min.js', | |
'app/libs/magnific-popup/dist/jquery.magnific-popup.min.js', | |
'app/libs/jquery-mask-plugin/dist/jquery.mask.js', | |
'app/libs/slick-carousel/slick/slick.js', | |
'app/libs/jquery.form-styler/dist/jquery.formstyler.js', | |
'app/libs/nouislider/distribute/nouislider.js' | |
]) | |
.pipe(concat('libs.min.js')) | |
.pipe(uglify()) | |
.pipe(gulp.dest('app/js')) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment