mirror of https://github.com/snachodog/mybuddy.git
Enable args pass through for other gulp commands.
This is not a perfect solution, but does allow pass through of some command line args.
This commit is contained in:
parent
162f117cef
commit
20924eeaec
|
@ -10,17 +10,9 @@ var watchConfig = require('../config.js').watchConfig;
|
|||
gulp.task('lint', ['lint:styles', 'lint:python']);
|
||||
|
||||
gulp.task('lint:python', function(cb) {
|
||||
spawn(
|
||||
'pipenv',
|
||||
[
|
||||
'run',
|
||||
'flake8',
|
||||
'--exclude=migrations,manage.py,node_modules,settings'
|
||||
],
|
||||
{
|
||||
stdio: 'inherit'
|
||||
}
|
||||
).on('exit', cb);
|
||||
var command = ['run', 'flake8', '--exclude=migrations,manage.py,node_modules,settings'];
|
||||
command = command.concat(process.argv.splice(3));
|
||||
spawn('pipenv', command, { stdio: 'inherit' }).on('exit', cb);
|
||||
});
|
||||
|
||||
gulp.task('lint:styles', function(cb) {
|
||||
|
|
|
@ -4,18 +4,9 @@ var spawn = require('child_process').spawn;
|
|||
|
||||
|
||||
gulp.task('collectstatic', function(cb) {
|
||||
spawn(
|
||||
'pipenv',
|
||||
[
|
||||
'run',
|
||||
'python',
|
||||
'manage.py',
|
||||
'collectstatic'
|
||||
],
|
||||
{
|
||||
stdio: 'inherit'
|
||||
}
|
||||
).on('exit', cb);
|
||||
var command = ['run', 'python', 'manage.py', 'collectstatic'];
|
||||
command = command.concat(process.argv.splice(3));
|
||||
spawn('pipenv', command, { stdio: 'inherit' }).on('exit', cb);
|
||||
});
|
||||
|
||||
gulp.task('fake', function(cb) {
|
||||
|
@ -25,20 +16,12 @@ gulp.task('fake', function(cb) {
|
|||
});
|
||||
|
||||
gulp.task('migrate', function(cb) {
|
||||
spawn(
|
||||
'pipenv',
|
||||
[
|
||||
'run',
|
||||
'python',
|
||||
'manage.py',
|
||||
'migrate'
|
||||
],
|
||||
{
|
||||
stdio: 'inherit'
|
||||
}
|
||||
).on('exit', cb);
|
||||
var command = ['run', 'python', 'manage.py', 'migrate'];
|
||||
command = command.concat(process.argv.splice(3));
|
||||
spawn('pipenv', command, { stdio: 'inherit' }).on('exit', cb);
|
||||
});
|
||||
|
||||
|
||||
gulp.task('reset', function(cb) {
|
||||
spawn(
|
||||
'pipenv',
|
||||
|
@ -56,16 +39,7 @@ gulp.task('reset', function(cb) {
|
|||
});
|
||||
|
||||
gulp.task('runserver', function(cb) {
|
||||
spawn(
|
||||
'pipenv',
|
||||
[
|
||||
'run',
|
||||
'python',
|
||||
'manage.py',
|
||||
'runserver'
|
||||
],
|
||||
{
|
||||
stdio: 'inherit'
|
||||
}
|
||||
).on('exit', cb);
|
||||
var command = ['run', 'python', 'manage.py', 'runserver'];
|
||||
command = command.concat(process.argv.splice(3));
|
||||
spawn('pipenv', command, { stdio: 'inherit' }).on('exit', cb);
|
||||
});
|
|
@ -4,18 +4,9 @@ var spawn = require('child_process').spawn;
|
|||
|
||||
|
||||
gulp.task('test', function(cb) {
|
||||
spawn(
|
||||
'pipenv',
|
||||
[
|
||||
'run',
|
||||
'python',
|
||||
'manage.py',
|
||||
'test'
|
||||
],
|
||||
{
|
||||
stdio: 'inherit'
|
||||
}
|
||||
).on('exit', cb);
|
||||
var command = ['run', 'python', 'manage.py', 'test'];
|
||||
command = command.concat(process.argv.splice(3));
|
||||
spawn('pipenv', command, { stdio: 'inherit' }).on('exit', cb);
|
||||
});
|
||||
|
||||
gulp.task('coverage', function(cb) {
|
||||
|
|
Loading…
Reference in New Issue