gulp-foreman
v1.0.0
Published
A gulp plugin for using foreman in your workflow
Downloads
73
Readme
gulp-foreman
This is a small foreman runner built for use with gulp
(although it can be used outside of gulp as well).
Install
Install this plugin by running the following command at your terminal
npm i -S gulp-foreman
Example Usage
The following are a different ways to use the plugin
Default
Default usage is simple:
var gulp = require('gulp');
var foreman = require('gulp-foreman');
gulp.task('default', function (argument) {
foreman();
});
You can provide a .env
file in the same dir as your gulpfile.js
that will be used to configure the environment of your process.
Configuration
You can also pass a configuration object with several params:
- procfile: You can pass a string to this to specify the procfile used.
- env: You can pass a string, or an array of strings, to define and configure the environment.
- port: You can pass a number to define the default port. NOTE: If you pass this param it will supercede any value passed in a .ENV file
Procfile Config
var gulp = require('gulp');
var foreman = require('gulp-foreman');
gulp.task('default', function (argument) {
foreman({
procfile: 'Procfile.dev'
});
});
Env Config
var gulp = require('gulp');
var foreman = require('gulp-foreman');
gulp.task('default', function (argument) {
foreman({
env: 'beta.env',
// You can also pass an array like below and all envs will be included
// env: ['beta.env', 'beta_test.env']
});
});
Port Config
var gulp = require('gulp');
var foreman = require('gulp-foreman');
gulp.task('default', function (argument) {
foreman({
port: 80
});
});
License
MIT