https://github.com/emartech/boar-tasks
Gulp tasks for Boar applications
https://github.com/emartech/boar-tasks
Last synced: 11 months ago
JSON representation
Gulp tasks for Boar applications
- Host: GitHub
- URL: https://github.com/emartech/boar-tasks
- Owner: emartech
- License: mit
- Created: 2015-03-05T09:01:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T13:37:26.000Z (almost 8 years ago)
- Last Synced: 2025-07-06T23:39:19.304Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 31
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# boar-tasks [ ](https://codeship.com/projects/66644)
[](https://david-dm.org/emartech/boar-tasks)
# Example tasks
## Prerequisites
```javascript
var config = require('./tasks.config');
var tasks = require('boar-tasks').getTasks(gulp, config);
```
## Publishing
Deploying to S3 and registering files in Emarsys Redirector service.
```javascript
gulp.task('publish', ['publish-s3', 'publish-redirector']);
gulp.task('publish-s3', function() { return tasks.s3.publish(); });
gulp.task('publish-redirector', function() { return tasks.redirector.save(); });
```
### Revision customization
By default `Boar-tasks` will use a timestamp based revision on the `s3.publish` and the `redirector.save` tasks. If you prefer to use the version number as revision from the `package.json` then change the `revision.type` property of the task configuration to `package`.
If you would like to setup the revision by yourself you can define it in two different ways:
#### 1. Use --revision argument
```bash
gulp publish --revision myCustomRevision
```
#### 2. Directly add revisions to the tasks
```javascript
var revision = 'myCustomRevision';
gulp.task('publish', ['publish-s3', 'publish-redirector']);
gulp.task('publish-s3', function() { return tasks.s3.publish(revision); });
gulp.task('publish-redirector', function() { return tasks.redirector.save(revision); });
```