update to latest standards

This commit is contained in:
Philipp Kunz 2017-07-07 18:32:37 +02:00
parent d0e6bbd162
commit d3069ebf5f
12 changed files with 2855 additions and 137 deletions

View File

@ -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: stages:
- test - test
@ -10,6 +16,7 @@ testLEGACY:
stage: test stage: test
script: script:
- npmci test legacy - npmci test legacy
coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
allow_failure: true allow_failure: true
@ -18,6 +25,7 @@ testLTS:
stage: test stage: test
script: script:
- npmci test lts - npmci test lts
coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
@ -25,6 +33,7 @@ testSTABLE:
stage: test stage: test
script: script:
- npmci test stable - npmci test stable
coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
@ -47,13 +56,17 @@ trigger:
- docker - docker
pages: pages:
image: hosttoday/ht-docker-node:npmpage image: hosttoday/ht-docker-node:npmci
stage: pages stage: pages
script: script:
- npmci command npmpage --publish gitlab - npmci command yarn global add npmpage
- npmci command npmpage
tags:
- docker
only: only:
- tags - tags
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
- public - public
allow_failure: true

View File

@ -1,6 +1,7 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("typings-global"); require("typings-global");
exports.through2 = require("through2"); exports.through2 = require("through2");
exports.path = require("path"); exports.path = require("path");
exports.browserify = require("browserify"); exports.browserify = require("browserify");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VscGJyb3dzZXIucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2d1bHBicm93c2VyLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF1QjtBQUN2Qix1Q0FBNEM7QUFDNUMsK0JBQW9DO0FBQ3BDLDJDQUFnRCJ9 //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VscGJyb3dzZXIucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2d1bHBicm93c2VyLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwQkFBdUI7QUFDdkIsdUNBQTRDO0FBQzVDLCtCQUFvQztBQUNwQywyQ0FBZ0QifQ==

3
dist/index.js vendored
View File

@ -1,3 +1,4 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.browserify = require("./gulpbrowser.browserify"); exports.browserify = require("./gulpbrowser.browserify");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEseURBQStEIn0= //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlEQUE4RCJ9

7
npmextra.json Normal file
View File

@ -0,0 +1,7 @@
{
"npmci": {
"globalNpmTools": [
"npmts"
]
}
}

View File

@ -1,4 +0,0 @@
{
"mode":"default",
"coveralls":true
}

View File

@ -29,24 +29,22 @@
}, },
"homepage": "https://gitlab.com/pushrocks/gulp-browser", "homepage": "https://gitlab.com/pushrocks/gulp-browser",
"dependencies": { "dependencies": {
"@types/browserify": "^12.0.30", "@types/browserify": "^12.0.32",
"@types/q": "0.0.32", "@types/q": "1.0.2",
"@types/through2": "^2.0.32", "@types/through2": "^2.0.33",
"browserify": "^13.1.1", "browserify": "^14.4.0",
"q": "^1.4.1", "q": "^1.5.0",
"smartq": "^1.1.6",
"through2": "^2.0.3", "through2": "^2.0.3",
"typings-global": "^1.0.14" "typings-global": "^1.0.19"
}, },
"devDependencies": { "devDependencies": {
"@types/gulp": "^3.8.32", "@types/gulp": "^4.0.4",
"@types/should": "^8.1.30", "babel-preset-es2015": "^6.24.1",
"babel-preset-es2015": "^6.18.0",
"babelify": "^7.3.0", "babelify": "^7.3.0",
"beautylog": "^6.0.0", "beautylog": "^6.1.10",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-function": "^2.2.3", "gulp-function": "^2.2.9",
"npmts-g": "^5.2.10", "tapbundle": "^1.1.0"
"should": "^11.1.2",
"typings-test": "^1.0.3"
} }
} }

1
test/test.d.ts vendored
View File

@ -1 +0,0 @@
import 'typings-test';

View File

@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdCQUFxQjtBQUdyQiw2QkFBNEI7QUFDNUIsZ0RBQStDO0FBQy9DLDhDQUE2QztBQUc3Qyx1QkFBc0I7QUFHdEIsUUFBUSxDQUFDLGFBQWEsRUFBRTtJQUNwQixRQUFRLENBQUMsYUFBYSxFQUFFO1FBQ3BCLEVBQUUsQ0FBQyw2QkFBNkIsRUFBRSxVQUFVLElBQUk7WUFDNUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsQ0FBQTtZQUNuQixJQUFJLE1BQU0sR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLGdDQUFnQyxDQUFDO2lCQUNsRCxJQUFJLENBQUMsV0FBVyxDQUFDLFVBQVUsRUFBRSxDQUFDO2lCQUM5QixJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO2lCQUNqQyxJQUFJLENBQUMsWUFBWSxDQUFDLEtBQUssQ0FBQztnQkFDckIsSUFBSSxLQUFLLEdBQUcsQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFBO2dCQUNyQixJQUFJLEVBQUUsQ0FBQTtnQkFDTixLQUFLLENBQUMsT0FBTyxFQUFFLENBQUE7Z0JBQ2YsTUFBTSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUE7WUFDeEIsQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUNYLENBQUMsQ0FBQyxDQUFBO1FBRUYsRUFBRSxDQUFDLG1EQUFtRCxFQUFFLFVBQVUsSUFB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,30 @@
import 'typings-test'
import * as beautylog from 'beautylog' import * as beautylog from 'beautylog'
import * as gulp from 'gulp' import * as gulp from 'gulp'
import * as gulpBrowser from '../dist/index.js'
import * as gulpFunction from 'gulp-function' import * as gulpFunction from 'gulp-function'
import * as smartq from 'smartq'
import * as should from 'should' import { expect, tap } from 'tapbundle'
import * as q from 'q'
import * as gulpBrowser from '../dist/index.js'
describe('gulpBrowser', function () { tap.test('should run through smoothly', async () => {
describe('.browserify', function () { let done = smartq.defer()
it('should run through smoothly', function (done) {
this.timeout(30000)
let stream = gulp.src('./test/testBrowserifyNormal.js') let stream = gulp.src('./test/testBrowserifyNormal.js')
.pipe(gulpBrowser.browserify()) .pipe(gulpBrowser.browserify())
.pipe(gulp.dest('./test/result/')) .pipe(gulp.dest('./test/result/'))
.pipe(gulpFunction.atEnd(() => { .pipe(gulpFunction.atEnd(async () => {
let done2 = q.defer() done.resolve()
done()
done2.resolve()
return done2.promise
})) }))
await done.promise
}) })
it('should throw an error, when a module is not found', function (done) { tap.test('should throw an error, when a module is not found', async () => {
let done = smartq.defer()
let d = require('domain').create() let d = require('domain').create()
let doneCalled = false let doneCalled = false
d.on('error', function (error) { d.on('error', function (error) {
if (!doneCalled) { if (!doneCalled) {
done() done.resolve()
doneCalled = true doneCalled = true
} }
}) })
@ -37,16 +32,22 @@ describe('gulpBrowser', function () {
let stream = gulp.src('./test/testBrowserifyError.js') let stream = gulp.src('./test/testBrowserifyError.js')
.pipe(gulpBrowser.browserify()) .pipe(gulpBrowser.browserify())
}) })
await done.promise
}) })
it('should run through with an empty file', function (done) { tap.test('should run through with an empty file', async () => {
let done = smartq.defer()
let stream = gulp.src('./test/testBrowserifyEmpty.js') let stream = gulp.src('./test/testBrowserifyEmpty.js')
.pipe(gulpBrowser.browserify()) .pipe(gulpBrowser.browserify())
.pipe(gulp.dest('./test/result/')) .pipe(gulp.dest('./test/result/'))
.pipe(gulpFunction.atEnd(done)) .pipe(gulpFunction.atEnd(async () => {
done.resolve()
}))
await done.promise
}) })
it('should run through work with transforms', function (done) {
this.timeout(30000) tap.test('should run through work with transforms', async () => {
let done = smartq.defer()
let transforms = [ let transforms = [
{ {
transform: 'babelify', transform: 'babelify',
@ -56,7 +57,10 @@ describe('gulpBrowser', function () {
let stream = gulp.src('./test/testBrowserifyNormal.js') let stream = gulp.src('./test/testBrowserifyNormal.js')
.pipe(gulpBrowser.browserify(transforms)) .pipe(gulpBrowser.browserify(transforms))
.pipe(gulp.dest('./test/result/')) .pipe(gulp.dest('./test/result/'))
.pipe(gulpFunction.atEnd(done)) .pipe(gulpFunction.atEnd(async () => {
}) done.resolve()
}) }))
await done.promise
}) })
tap.start()

View File

@ -1 +1 @@
export import browserify = require("./gulpbrowser.browserify"); export import browserify = require("./gulpbrowser.browserify")

2756
yarn.lock Normal file

File diff suppressed because it is too large Load Diff