update to latest standards
This commit is contained in:
parent
d0e6bbd162
commit
d3069ebf5f
@ -1,4 +1,10 @@
|
||||
image: hosttoday/ht-docker-node:npmts
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .yarn/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
|
||||
stages:
|
||||
- test
|
||||
@ -10,6 +16,7 @@ testLEGACY:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test legacy
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
@ -18,6 +25,7 @@ testLTS:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test lts
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
@ -25,6 +33,7 @@ testSTABLE:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test stable
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
@ -47,13 +56,17 @@ trigger:
|
||||
- docker
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-node:npmpage
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
stage: pages
|
||||
script:
|
||||
- npmci command npmpage --publish gitlab
|
||||
- npmci command yarn global add npmpage
|
||||
- npmci command npmpage
|
||||
tags:
|
||||
- docker
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
||||
allow_failure: true
|
||||
|
3
dist/gulpbrowser.plugins.js
vendored
3
dist/gulpbrowser.plugins.js
vendored
@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("typings-global");
|
||||
exports.through2 = require("through2");
|
||||
exports.path = require("path");
|
||||
exports.browserify = require("browserify");
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VscGJyb3dzZXIucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2d1bHBicm93c2VyLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF1QjtBQUN2Qix1Q0FBNEM7QUFDNUMsK0JBQW9DO0FBQ3BDLDJDQUFnRCJ9
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VscGJyb3dzZXIucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2d1bHBicm93c2VyLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwQkFBdUI7QUFDdkIsdUNBQTRDO0FBQzVDLCtCQUFvQztBQUNwQywyQ0FBZ0QifQ==
|
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -1,3 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.browserify = require("./gulpbrowser.browserify");
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEseURBQStEIn0=
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlEQUE4RCJ9
|
7
npmextra.json
Normal file
7
npmextra.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"npmci": {
|
||||
"globalNpmTools": [
|
||||
"npmts"
|
||||
]
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"mode":"default",
|
||||
"coveralls":true
|
||||
}
|
26
package.json
26
package.json
@ -29,24 +29,22 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/gulp-browser",
|
||||
"dependencies": {
|
||||
"@types/browserify": "^12.0.30",
|
||||
"@types/q": "0.0.32",
|
||||
"@types/through2": "^2.0.32",
|
||||
"browserify": "^13.1.1",
|
||||
"q": "^1.4.1",
|
||||
"@types/browserify": "^12.0.32",
|
||||
"@types/q": "1.0.2",
|
||||
"@types/through2": "^2.0.33",
|
||||
"browserify": "^14.4.0",
|
||||
"q": "^1.5.0",
|
||||
"smartq": "^1.1.6",
|
||||
"through2": "^2.0.3",
|
||||
"typings-global": "^1.0.14"
|
||||
"typings-global": "^1.0.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/gulp": "^3.8.32",
|
||||
"@types/should": "^8.1.30",
|
||||
"babel-preset-es2015": "^6.18.0",
|
||||
"@types/gulp": "^4.0.4",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babelify": "^7.3.0",
|
||||
"beautylog": "^6.0.0",
|
||||
"beautylog": "^6.1.10",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-function": "^2.2.3",
|
||||
"npmts-g": "^5.2.10",
|
||||
"should": "^11.1.2",
|
||||
"typings-test": "^1.0.3"
|
||||
"gulp-function": "^2.2.9",
|
||||
"tapbundle": "^1.1.0"
|
||||
}
|
||||
}
|
||||
|
1
test/test.d.ts
vendored
1
test/test.d.ts
vendored
@ -1 +0,0 @@
|
||||
import 'typings-test';
|
56
test/test.js
56
test/test.js
@ -1,56 +0,0 @@
|
||||
"use strict";
|
||||
require("typings-test");
|
||||
const gulp = require("gulp");
|
||||
const gulpBrowser = require("../dist/index.js");
|
||||
const gulpFunction = require("gulp-function");
|
||||
const q = require("q");
|
||||
describe('gulpBrowser', function () {
|
||||
describe('.browserify', function () {
|
||||
it('should run through smoothly', function (done) {
|
||||
this.timeout(30000);
|
||||
let stream = gulp.src('./test/testBrowserifyNormal.js')
|
||||
.pipe(gulpBrowser.browserify())
|
||||
.pipe(gulp.dest('./test/result/'))
|
||||
.pipe(gulpFunction.atEnd(() => {
|
||||
let done2 = q.defer();
|
||||
done();
|
||||
done2.resolve();
|
||||
return done2.promise;
|
||||
}));
|
||||
});
|
||||
it('should throw an error, when a module is not found', function (done) {
|
||||
let d = require('domain').create();
|
||||
let doneCalled = false;
|
||||
d.on('error', function (error) {
|
||||
if (!doneCalled) {
|
||||
done();
|
||||
doneCalled = true;
|
||||
}
|
||||
});
|
||||
d.run(function () {
|
||||
let stream = gulp.src('./test/testBrowserifyError.js')
|
||||
.pipe(gulpBrowser.browserify());
|
||||
});
|
||||
});
|
||||
it('should run through with an empty file', function (done) {
|
||||
let stream = gulp.src('./test/testBrowserifyEmpty.js')
|
||||
.pipe(gulpBrowser.browserify())
|
||||
.pipe(gulp.dest('./test/result/'))
|
||||
.pipe(gulpFunction.atEnd(done));
|
||||
});
|
||||
it('should run through work with transforms', function (done) {
|
||||
this.timeout(30000);
|
||||
let transforms = [
|
||||
{
|
||||
transform: 'babelify',
|
||||
options: { presets: ['es2015'] }
|
||||
}
|
||||
];
|
||||
let stream = gulp.src('./test/testBrowserifyNormal.js')
|
||||
.pipe(gulpBrowser.browserify(transforms))
|
||||
.pipe(gulp.dest('./test/result/'))
|
||||
.pipe(gulpFunction.atEnd(done));
|
||||
});
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdCQUFxQjtBQUdyQiw2QkFBNEI7QUFDNUIsZ0RBQStDO0FBQy9DLDhDQUE2QztBQUc3Qyx1QkFBc0I7QUFHdEIsUUFBUSxDQUFDLGFBQWEsR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AG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;gBAC1B,EAAE,CAAA,CAAC,CAAC,UAAU,CAAC,CAAA,CAAC;oBACZ,IAAI,EAAE,CAAC;oBACP,UAAU,GAAG,IAAI,CAAC;gBACtB,CAAC;YACL,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,GAAG,CAAC;gBACF,IAAI,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,+BAA+B,CAAC;qBACzD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;YAChD,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uCAAuC,EAAE,UAAU,IAAI;YACtD,IAAI,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,+BAA+B,CAAC;iBACzD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;iBACtC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;iBACzC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
114
test/test.ts
114
test/test.ts
@ -1,62 +1,66 @@
|
||||
import 'typings-test'
|
||||
|
||||
import * as beautylog from 'beautylog'
|
||||
import * as gulp from 'gulp'
|
||||
import * as gulpBrowser from '../dist/index.js'
|
||||
import * as gulpFunction from 'gulp-function'
|
||||
import * as smartq from 'smartq'
|
||||
|
||||
import * as should from 'should'
|
||||
import * as q from 'q'
|
||||
import { expect, tap } from 'tapbundle'
|
||||
|
||||
import * as gulpBrowser from '../dist/index.js'
|
||||
|
||||
describe('gulpBrowser', function () {
|
||||
describe('.browserify', function () {
|
||||
it('should run through smoothly', function (done) {
|
||||
this.timeout(30000)
|
||||
let stream = gulp.src('./test/testBrowserifyNormal.js')
|
||||
.pipe(gulpBrowser.browserify())
|
||||
.pipe(gulp.dest('./test/result/'))
|
||||
.pipe(gulpFunction.atEnd(() => {
|
||||
let done2 = q.defer()
|
||||
done()
|
||||
done2.resolve()
|
||||
return done2.promise
|
||||
}))
|
||||
})
|
||||
|
||||
it('should throw an error, when a module is not found', function (done) {
|
||||
let d = require('domain').create()
|
||||
let doneCalled = false
|
||||
d.on('error',function(error){
|
||||
if (!doneCalled) {
|
||||
done()
|
||||
doneCalled = true
|
||||
}
|
||||
})
|
||||
d.run(function() {
|
||||
let stream = gulp.src('./test/testBrowserifyError.js')
|
||||
.pipe(gulpBrowser.browserify())
|
||||
})
|
||||
})
|
||||
|
||||
it('should run through with an empty file', function (done) {
|
||||
let stream = gulp.src('./test/testBrowserifyEmpty.js')
|
||||
.pipe(gulpBrowser.browserify())
|
||||
.pipe(gulp.dest('./test/result/'))
|
||||
.pipe(gulpFunction.atEnd(done))
|
||||
})
|
||||
it('should run through work with transforms', function (done) {
|
||||
this.timeout(30000)
|
||||
let transforms = [
|
||||
{
|
||||
transform: 'babelify',
|
||||
options: {presets: ['es2015']}
|
||||
}
|
||||
]
|
||||
let stream = gulp.src('./test/testBrowserifyNormal.js')
|
||||
.pipe(gulpBrowser.browserify(transforms))
|
||||
.pipe(gulp.dest('./test/result/'))
|
||||
.pipe(gulpFunction.atEnd(done))
|
||||
})
|
||||
})
|
||||
tap.test('should run through smoothly', async () => {
|
||||
let done = smartq.defer()
|
||||
let stream = gulp.src('./test/testBrowserifyNormal.js')
|
||||
.pipe(gulpBrowser.browserify())
|
||||
.pipe(gulp.dest('./test/result/'))
|
||||
.pipe(gulpFunction.atEnd(async () => {
|
||||
done.resolve()
|
||||
}))
|
||||
await done.promise
|
||||
})
|
||||
|
||||
tap.test('should throw an error, when a module is not found', async () => {
|
||||
let done = smartq.defer()
|
||||
let d = require('domain').create()
|
||||
let doneCalled = false
|
||||
d.on('error', function (error) {
|
||||
if (!doneCalled) {
|
||||
done.resolve()
|
||||
doneCalled = true
|
||||
}
|
||||
})
|
||||
d.run(function () {
|
||||
let stream = gulp.src('./test/testBrowserifyError.js')
|
||||
.pipe(gulpBrowser.browserify())
|
||||
})
|
||||
await done.promise
|
||||
})
|
||||
|
||||
tap.test('should run through with an empty file', async () => {
|
||||
let done = smartq.defer()
|
||||
let stream = gulp.src('./test/testBrowserifyEmpty.js')
|
||||
.pipe(gulpBrowser.browserify())
|
||||
.pipe(gulp.dest('./test/result/'))
|
||||
.pipe(gulpFunction.atEnd(async () => {
|
||||
done.resolve()
|
||||
}))
|
||||
await done.promise
|
||||
})
|
||||
|
||||
tap.test('should run through work with transforms', async () => {
|
||||
let done = smartq.defer()
|
||||
let transforms = [
|
||||
{
|
||||
transform: 'babelify',
|
||||
options: { presets: [ 'es2015' ] }
|
||||
}
|
||||
]
|
||||
let stream = gulp.src('./test/testBrowserifyNormal.js')
|
||||
.pipe(gulpBrowser.browserify(transforms))
|
||||
.pipe(gulp.dest('./test/result/'))
|
||||
.pipe(gulpFunction.atEnd(async () => {
|
||||
done.resolve()
|
||||
}))
|
||||
await done.promise
|
||||
})
|
||||
|
||||
tap.start()
|
||||
|
@ -1 +1 @@
|
||||
export import browserify = require("./gulpbrowser.browserify");
|
||||
export import browserify = require("./gulpbrowser.browserify")
|
||||
|
Loading…
Reference in New Issue
Block a user