By Susumu Yamazaki <[email protected]>
gulp-parcel is a gulp plugin to exec parcel command.
$ npm install --global parcel-bundler
$ yarn global add parcel-bundler
gulp = require 'gulp'
parcel = require 'gulp-parcel'
gulp.task 'build:js', () ->
gulp.src 'source/javascripts/all.js', {read:false}
.pipe parcel()
.pipe gulp.dest('build/javascripts/')
gulp = require 'gulp'
parcel = require 'gulp-parcel'
gulp.task 'build', () ->
gulp.src 'build/**/*.html', {read:false}
.pipe parcel({outDir: 'dist', publicURL: './'}, {source: 'build'})
.pipe gulp.dest('dist')
call parcel gulp.src
with options and g_options
Type: Object
Currently the following options are supported:
- watch: true or false (default: false)
- outDir: string (default: temporary directory)
- cache: true or false (default: true)
- cacheDir: true or false (default: '.cache')
- killWorkers: true or false (default: true)
- minify: true or false (default: !watch)
- hmr: true or false (default: watch)
- logLevel: number (default: 3)
- publicURL: string
Type: Object
Currently one option are supported:
- source: string
Copyright (c) 2017 Susumu Yamazaki <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.