Newline Proliferating Maniac
    Have ideas to improve npm?Join in the discussion! »

    This package has been deprecated

    Author message:

    This package has been deprecated

    gulp-pipe-assets

    4.0.1 • Public • Published

    gulp-pipe-assets Circle CI npm version

    Gulp asset pipeline (i.e. images, videos, fonts, documents, stylesheets via Sass, JavaScripts via Webpack, etc). This pipeline creates the following Gulp tasks:

    1. images - images task from gulp-pipe-media
    2. videos - videos task from gulp-pipe-media
    3. fonts - fonts task from gulp-pipe-media
    4. documents - documents task from gulp-pipe-media
    5. extras - extras task from gulp-pipe-media
    6. styles - gulp-task-sass
    7. scripts - gulp-task-webpack
    8. rev - gulp-task-rev
    9. assets - Sequence of the above tasks in that order.

    Usage

    import gulp from 'gulp';
    import assets from 'gulp-pipe-assets';
     
    assets.init(gulp, {
      base: 'app',
      dest: 'public',
      scripts: {
        entry: {
          application: './application.js' 
        }
      }
    });
    $ gulp assets
    

    API

    init(gulp, options[, extendsDefaults])

    gulp

    Type: Object

    Gulp instance.

    options

    Type: Object

    Options that define the behavior of this task. This object is parsed by config() in gulp-task-helpers, so you can target specific NODE_ENV environments.

    options.base

    Type: string
    Default: undefined

    The fallback base path for the individual tasks if a specific one is not provided.

    options.dest

    Type: string
    Default: undefined

    The fallback destination path for the individual tasks if a specific one is not provided.

    options.watch

    Type: Object or boolean

    Fallback watch options for the individual tasks if a specific one is not provided.

    options.images

    Type: Object
    Default: undefined

    Options for images task from gulp-pipe-media.

    options.videos

    Type: Object
    Default: undefined

    Options for videos task from gulp-pipe-media.

    options.fonts

    Type: Object
    Default: undefined

    Options for fonts task from gulp-pipe-media.

    options.documents

    Type: Object
    Default: undefined

    Options for documents task from gulp-pipe-media.

    options.extras

    Type: Object
    Default: undefined

    Options for extras task from gulp-pipe-media.

    options.scripts

    Type: Object
    Default:

    {
      context: `${options.base}/javascripts`,
      output: {
        path: `${config.dest}/assets/javascripts`,
        publicPath: 'assets/javascripts'
      }
    }

    Options for gulp-task-webpack.

    options.styles

    Type: Object
    Default:

    {
      src: 'stylesheets/*',
      dest: `${options.dest}/assets`,
      sass: {
        includePaths: [`${options.base}/stylesheets`]
      },
      watch: {
        files: `${options.base}/stylesheets/**/*`
      },
      envs: {
        production: {
          purify: `${options.dest}/**/*`
        }
      }
    }

    Options for gulp-task-sass.

    options.rev

    Type: Object
    Default:

    {
      envs: {
        production: {
          src: `${options.dest}`
        }
      }
    }

    Options for gulp-task-rev.

    extendsDefaults

    Type: boolean
    Default: true

    Maps to useConcat param in config() of gulp-task-helpers.

    Disclaimer

    This is an experimental project driven by internal requirements.

    License

    This software is released under the MIT License.

    Keywords

    none

    Install

    npm i gulp-pipe-assets

    DownloadsWeekly Downloads

    3

    Version

    4.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar