javascript - Copying 3rd party dependencies (bootstrap, jquery..) with gulp -


i'm trying achieve (seemingly?) simple task involves nothing copying few 3rd party dependencies (namely jquery, bootstrap , font-awesome) publishing directory.

  • the environment provided gulp-util / command line
  • the dependencies installed using npm (i see no point in using bower).
  • the files should selected based on environment, e.g. .min., .map production, unmodified files development.
  • since each dependency provides minified version, don't think makes sense myself.
  • the selected files should injected main site using gulp-inject.

the resulting folder structure should this:

.public/     vendor/         bootstrap/             js/             css/             fonts/         jquery             js 

now, i'm having following problems:

  • the contents of of packages total mess. dependencies have dist folder inside them, not. have .map files, others don't. , place (including *.less files , whatnot root of package. can't seem use wildcard or (?).

    .> need way of selecting right file each environment without creating gulpfile contains nothing hardcoded, concatenated paths on place.

  • when emitting files copied using gulp.dest, whole path of file copied. when have jquery/dist/js/jquery.js, end folder structure vendor/jquery/dist/jquery instead of vendor/jquery/js/jquery.js

    .> there plugin let's me configure pattern of copy operation?

how guys set gulp-tasks can work streamlined, generic build pipeline doesn't require special configuration each , every dependency?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -