-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f32ac6
commit 072dcc7
Showing
6 changed files
with
1,949 additions
and
836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
var gulp = require('gulp') | ||
var surge = require('./') | ||
var mocha = require('gulp-mocha') | ||
var standard = require('gulp-standard') | ||
const {src, parallel} = require('gulp') | ||
const surge = require('./') | ||
const mocha = require('gulp-mocha') | ||
const standard = require('gulp-standard') | ||
|
||
gulp.task('default', ['test', 'deploy', 'lint']) | ||
const lint = () => { | ||
return src(['./index.js', './test/**/*.js']) | ||
.pipe(standard()) | ||
.pipe(standard.reporter('default', { | ||
breakOnError: false | ||
})) | ||
} | ||
|
||
gulp.task('test', function () { | ||
return gulp.src('./test/**/*.js', { read: false }) | ||
const test = () => { | ||
return src('./test/**/*.js', { read: false }) | ||
.pipe(mocha({ timeout: 1000 })) | ||
}) | ||
} | ||
|
||
gulp.task('deploy', [], function () { | ||
const deploy = () => { | ||
return surge({ | ||
project: './test/fixtures/gulp-test-1.surge.sh', | ||
domain: 'gulp-test-1.surge.sh' | ||
}) | ||
}) | ||
} | ||
|
||
gulp.task('lint', [], function () { | ||
return gulp.src(['./index.js', './test/**/*.js']) | ||
.pipe(standard()) | ||
.pipe(standard.reporter('default', { | ||
breakOnError: false | ||
})) | ||
}) | ||
tasks = [lint, test, deploy] | ||
|
||
exports.default = parallel(...tasks) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
'use strict' | ||
|
||
// var gutil = require('gulp-util') | ||
var spawn = require('child_process').spawn | ||
var path = require('path') | ||
// var surge = require('surge') | ||
var surge = path.resolve(path.dirname(require.resolve('surge')), '../../.bin/surge' + (process.platform === 'win32' ? '.cmd' : '')) | ||
const spawn = require('child_process').spawn | ||
const path = require('path') | ||
|
||
module.exports = function (options) { | ||
return spawn(surge, [options.project, options.domain], { stdio: 'inherit' }) | ||
const surge = path.resolve( | ||
path.dirname(require.resolve('surge')), | ||
'../../.bin/surge' + (process.platform === 'win32' ? '.cmd' : '') | ||
) | ||
|
||
module.exports = (options) => { | ||
spawn(surge, [options.project, options.domain], { stdio: 'inherit' }) | ||
} |
Oops, something went wrong.