3.13.1 • Published 7 years ago

gulp-config-dev v3.13.1

Weekly downloads
2
License
CC0-1.0
Repository
github
Last release
7 years ago

gulp-config-dev

NPM Version Build Status

gulp-config-dev is a shareable configuration package for gulp.

Usage

Add gulp-config-dev to your project:

npm install --save-dev gulp-config-dev

Then, add this script to your package.json:

{
  "scripts": {
    "start": "gulp --cwd . --gulpfile node_modules/gulp-config-dev",
  }
}

That’s it. Now you can launch a web server to host your projects, build files, and watch for changes.

npm start
  • You can also build files and watch for changes, but not host it.

    npm start live
  • Or, you could just build files.

    npm start dist

Configuration

Customize functionality of gulp-config-dev from your package.json:

{
  "gulpConfig": {
    ...
  }
}
  • html: Path of your primary HTML file. Use false to omit HTML. Default is ${package.name}.html.
  • js: Path of your primary JS file. Use false to omit JS. Default is ${package.name}.js.
  • css: Path of your primary CSS file. Use false to omit CSS. Default is ${package.name}.css.
  • files: Directory of any additional files used by your project. Default is placeholders.
  • use-postcss: Whether to use PostCSS or not. Default is true.
  • use-sass: Whether to use Sass or not. Default is true.
  • watch-css: Array of paths to watch for CSS changes.
  • watch-js: Array of paths to watch for JS changes.
  • watch-html: Array of paths to watch for HTML changes.
  • compress-js: Whether to compress JS or not.
  • compress-css: Whether to compress CSS or not.
  • server: Advanced options for gulp-connect.

Advanced Configuration

  • server-root: Destintation of your compiled files. Default is dist.
  • server-host: Name of the server host. Default is localhost.
  • server-name: Name of the server for logging purposes. Default is package name.
  • server-port: Port to use for the web server. Default is 8080.
  • server-browser: Whether to launch the browser. Default is true.
  • server-livereload: Whether to inject livereload. Default is true.
  • html-dest: Destination of your compiled HTML file relative to server-root. Default is index.html.
  • js-dest: Destination of your compiled JS file relative to server-root. Default is index.js.
  • js-module-name: Name of the JS export, if required. Default is false.
  • js-module-format: Format of the compiled JS. Default is iife.
  • css-dest: Destination of your compiled CSS file relative to server-root. Default is index.css.
  • css-syntax: Syntax to use in CSS. Default is scss.
3.13.1

7 years ago

3.13.0

7 years ago

3.12.0

7 years ago

3.11.0

7 years ago

3.10.1

7 years ago

3.10.0

7 years ago

3.9.1

7 years ago

3.9.0

7 years ago

3.8.3

7 years ago

3.8.1

7 years ago

3.8.0

7 years ago

3.7.0

7 years ago

3.6.0

7 years ago

3.4.0

7 years ago

3.3.0

7 years ago

3.2.0

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.7.0

7 years ago

1.6.0

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago