https://github.com/breuleux/gulp-earl
gulp plugin for Earl Grey
https://github.com/breuleux/gulp-earl
Last synced: about 1 month ago
JSON representation
gulp plugin for Earl Grey
- Host: GitHub
- URL: https://github.com/breuleux/gulp-earl
- Owner: breuleux
- Created: 2015-04-07T02:29:16.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-15T02:14:21.000Z (over 8 years ago)
- Last Synced: 2025-04-14T20:10:01.614Z (about 1 month ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gulp-earl
=========gulp plugin for [Earl Grey](http://earl-grey.io)
Usage
-----> `earl([opts])`
### Options
`opts.es5` is a boolean option to change compilation to ES5. Defaults to false.
`opts.sourceMaps` is a string that specifies how to handle sourcemaps. `.compute` will compute sourcemaps but does not place `sourceMappingURL` within the file. `.inline` does add it. The default is null.
`opts.runtime` is a string that specifies which runtime to require. If null, no runtime is used and this removes some boilerplate code. This defaults to requiring `earlgrey-runtime`.
`opts.parameters` is an object containing flags that you can pass right into your programs to be accessed by macros via `@getopt("flagName")`. Flags are not limited to booleans and can be any arbitray data. For example (in EG):
```earl-grey
parameters = {
debug-level = .critical
test-data = {"Pepperoni", "Cheese", "Sausage", "Peppers"}
tests = false
}
```### JavaScript
var earl = require('gulp-earl');
gulp.task('earl', function() {
gulp.src('./src/**/*.eg')
.pipe(earl({}))
.pipe(gulp.dest('./build/'))
});### Earl Grey (using `earl-gulp`)
`earl-gulp` exports macros to neatly define gulp tasks in Earl Grey,
whereas `gulp-earl` (this package) is to compile `.eg` files. Don't
confuse them (maybe I should just merge them...)require-macros:
earl-gulp -> taskrequire:
gulp-earl as earltask earl:
chain gulp:
@src("./src/**/*.eg")
@pipe(earl())
@pipe(gulp.dest("./build/"))