2

I am currently using spoeken's gulp workflow (https://github.com/spoeken/gulp-craftcms). Everything works well in development, however, when it comes to production, I can't seem to concat/minify my bower_components dependencies, into one file.

I currently have a public/resources/js/app.min.js, however, my bower_component dependencies are sitting in app/resources/bower_components.

How do you go about minifying my dependencies into one file?

Here's what I have in my package.json file:

{
  "name": "craftgulp",
  "version": "0.0.0",
  "authors": [
    ""
  ],
  "license": "MIT",
  "private": true,
  "dependencies": {
    "jquery": "~2.2.0",
    "tether": "^1.4.0",
    "bootstrap": "v4.0.0-alpha.2",
    "gsap": "^1.19.1",
    "scrollmagic": "^2.0.5",
    "slick-carousel": "^1.6.0",
    "waypoints": "^4.0.1"
  },
  "overrides": {
    "bootstrap-sass": {
      "main": [
        "assets/stylesheets/_bootstrap.scss",
        "assets/fonts/bootstrap/*",
        "assets/javascripts/bootstrap.js"
      ]
    },
    "scrollmagic": {
      "main": [
        "./scrollmagic/uncompressed/ScrollMagic.js",
        "./scrollmagic/uncompressed/plugins/animation.gsap.js",
        "./scrollmagic/uncompressed/plugins/debug.addIndicators.js",
        "./scrollmagic/uncompressed/plugins/jquery.ScrollMagic.js"
      ]
    },
    "gsap": {
      "main": [
        "./src/uncompressed/TweenMax.js",
        "./src/uncompressed/TimelineLite.js",
        "./src/uncompressed/jquery.gsap.js"
      ]
    },
    "slick-carousel": {
      "main": [
        "./slick/slick.min.js",
        "./slick/slick.css",
        "./slick/slick-theme.css"
      ]
    },
    "waypoints": {
      "main": [
        "./lib/jquery.waypoints.min.js"
      ]
    }
  }
}
2

You would need to define them in the Gulp file build uglify task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.