Skip to content

Commit 177bbb7

Browse files
committed
=BG= clean up extraneous yargs instance usages in individual tasks
- also added a new npm run task for `testonly` that doesn't run lint, and isn't verbose
1 parent 79847c6 commit 177bbb7

File tree

7 files changed

+10
-29
lines changed

7 files changed

+10
-29
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
],
1717
"scripts": {
1818
"test": "npm run lint && node node_modules/jasmine-node/bin/jasmine-node --verbose --captureExceptions test/specs",
19+
"testonly": "node node_modules/jasmine-node/bin/jasmine-node --captureExceptions test/specs",
1920
"lint": "gulp lint --gulpfile ./test/jshint.js"
2021
},
2122
"contributors": [

tasks/build.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@ function setUpTaskBuild(tyRun) {
77
prerequisiteTasks: ['help', 'javascript', 'css', 'html'],
88
checks: [],
99
options: [],
10-
onInit: function onBuildTask(yargsInstance) {
10+
onInit: function onBuildTask() {
1111
var gulp = require('gulp'),
1212
runSequence = require('run-sequence');
1313

1414
var hr = require('../lib/util/hr');
1515

16-
yargsInstance
17-
.strict()
18-
.wrap(80);
19-
2016
gulp.task('build', function (done) {
2117
console.log(hr('-', 80, 'build'));
2218
runSequence('javascript', 'css', 'html', done);

tasks/css.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function setUpTaskCss(tyRun) {
77
prerequisiteTasks: ['help'],
88
checks: [],
99
options: [],
10-
onInit: function onInitCssTask(yargsInstance) {
10+
onInit: function onInitCssTask() {
1111
var gulp = require('gulp'),
1212
rimraf = require('gulp-rimraf'),
1313
runSequence = require('run-sequence');
@@ -16,10 +16,6 @@ function setUpTaskCss(tyRun) {
1616
hr = require('../lib/util/hr'),
1717
streams = require('../lib/config/streams');
1818

19-
yargsInstance
20-
.strict()
21-
.wrap(80);
22-
2319
gulp.task('css', function (done) {
2420
console.log(hr('-', 80, 'css'));
2521
runSequence(

tasks/html.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function setUpTaskHtml(tyRun) {
88
prerequisiteTasks: ['help'],
99
checks: [],
1010
options: [],
11-
onInit: function onInitHtmlTask(yargsInstance) {
11+
onInit: function onInitHtmlTask() {
1212
var gulp = require('gulp'),
1313
inject = require('gulp-inject'),
1414
plumber = require('gulp-plumber'),
@@ -20,10 +20,6 @@ function setUpTaskHtml(tyRun) {
2020
hr = require('../lib/util/hr'),
2121
streams = require('../lib/config/streams');
2222

23-
yargsInstance
24-
.strict()
25-
.wrap(80);
26-
2723
// `cliArgs` are available within gulp tasks by means of closure,
2824
// as they are only called after `onRun` has been invoked, and they have been passed
2925
gulp.task('html', function (done) {

tasks/init.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ function setUpInitTask(tyRun) {
220220
var cliArgs;
221221
var templateParams;
222222

223-
yargsInstance
223+
cliArgs = yargsInstance
224224
.strict()
225-
.wrap(80);
226-
cliArgs = yargsInstance.argv;
225+
.wrap(80)
226+
.argv;
227227

228228
gulp.task('init', function (done) {
229229
console.log(hr('-', 80, 'init'));

tasks/javascript.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ function setUpTaskJavascript(tyRun) {
116116

117117
var cliArgs;
118118
cliArgs = yargsInstance
119-
.strict()
120-
.wrap(80)
121-
.argv;
119+
.strict()
120+
.wrap(80)
121+
.argv;
122122

123123
gulp.task('javascript', function (done) {
124124
console.log(hr('-', 80, 'javascript'));

tasks/watch.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
'use strict';
22

33
function setUpTaskWatch(tyRun) {
4-
var defaults = require('../lib/config/defaults');
5-
6-
defaults.getInstance()
7-
.file('angularity.json')
8-
.defaults({
9-
port: 55555
10-
});
11-
124
var taskDefinition = {
135
name: 'watch',
146
description: ('The "watch" task performs an initial build and then serves the application on localhost at ' +

0 commit comments

Comments
 (0)