gulpfile.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. const gulp = require('gulp'),
  2. concat = require("gulp-concat"),
  3. rename = require("gulp-rename");
  4. cleanCSS = require('gulp-clean-css');
  5. gulp.task('copy', async function() {
  6. gulp.src('./node_modules/bootstrap/dist/js/bootstrap.js')
  7. .pipe(rename('v3-bootstrap.js'))
  8. .pipe(gulp.dest('./js/'));
  9. gulp.src('./node_modules/bootstrap/dist/css/bootstrap.css')
  10. .pipe(rename('v3-bootstrap.css'))
  11. .pipe(gulp.dest('./css/'));
  12. gulp.src('./node_modules/jquery/dist/jquery.min.js')
  13. .pipe(rename('v3-jquery.js'))
  14. .pipe(gulp.dest('./js/'));
  15. gulp.src('./node_modules/jasny-bootstrap/dist/js/jasny-bootstrap.min.js')
  16. .pipe(rename('v3-jasny-bootstrap.js'))
  17. .pipe(gulp.dest('./js/'));
  18. gulp.src('./node_modules/jasny-bootstrap/dist/css/jasny-bootstrap.css')
  19. .pipe(rename('v3-jasny-bootstrap.css'))
  20. .pipe(gulp.dest('./css/'));
  21. gulp.src('./node_modules/animate.css/animate.css')
  22. .pipe(rename('v3-animate.css'))
  23. .pipe(gulp.dest('./css/'));
  24. gulp.src('./node_modules/svg-morpheus/compile/minified/svg-morpheus.js')
  25. .pipe(rename('v3-svg-morpheus.js'))
  26. .pipe(gulp.dest('./js/'));
  27. gulp.src('./node_modules/@fullcalendar/core/main.js')
  28. .pipe(rename('fullcalendar.js'))
  29. .pipe(gulp.dest('./js/'));
  30. gulp.src('./node_modules/@fullcalendar/core/main.css')
  31. .pipe(rename('v3-fullcalendar.css'))
  32. .pipe(gulp.dest('./css/'));
  33. gulp.src('./node_modules/@fullcalendar/google-calendar/main.js')
  34. .pipe(rename('v3-fullcalendar-google.js'))
  35. .pipe(gulp.dest('./js/'));
  36. gulp.src('./node_modules/@fullcalendar/daygrid/main.js')
  37. .pipe(rename('v3-fullcalendar-daygrid.js'))
  38. .pipe(gulp.dest('./js/'));
  39. gulp.src('./node_modules/@fullcalendar/daygrid/main.css')
  40. .pipe(rename('v3-fullcalendar-daygrid.css'))
  41. .pipe(gulp.dest('./css/'));
  42. console.log("files 📄 from npm pkgs ");
  43. });
  44. gulp.task('css', async function() {
  45. gulp.src(['css/fonts.css', 'css/v3-fullcalendar.css', 'css/v3-fullcalendar-daygrid.css', 'css/v3-bootstrap.css', 'css/v3-animate.css', 'style.css'])
  46. .pipe(concat('v3-style.css'))
  47. .pipe(cleanCSS({level: {1: {specialComments: 0}}}))
  48. .pipe(rename('v3-style.min.css'))
  49. .pipe(gulp.dest('./'));
  50. gulp.src('css/front-page.css')
  51. .pipe(cleanCSS({level: {1: {specialComments: 0}}}))
  52. .pipe(rename('v3-front.min.css'))
  53. .pipe(gulp.dest('./css/'));
  54. console.log("CSS built 🔧 ");
  55. });