Compare commits
No commits in common. "master" and "v3.0.9" have entirely different histories.
@ -3,148 +3,93 @@ image: hosttoday/ht-docker-node:npmci
|
|||||||
|
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- .npmci_cache/
|
- .yarn/
|
||||||
key: "$CI_BUILD_STAGE"
|
key: "$CI_BUILD_STAGE"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- security
|
- security
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
- metadata
|
- trigger
|
||||||
|
- pages
|
||||||
|
|
||||||
# ====================
|
|
||||||
# security stage
|
|
||||||
# ====================
|
|
||||||
mirror:
|
mirror:
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci git mirror
|
- npmci git mirror
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
|
||||||
snyk:
|
snyk:
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci command yarn global add snyk
|
||||||
- npmci command npm install -g snyk
|
- npmci command yarn install --ignore-scripts
|
||||||
- npmci command npm install --ignore-scripts
|
|
||||||
- npmci command snyk test
|
- npmci command snyk test
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
|
||||||
sast:
|
testLEGACY:
|
||||||
stage: security
|
stage: test
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci
|
|
||||||
variables:
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
allow_failure: true
|
|
||||||
services:
|
|
||||||
- docker:stable-dind
|
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
- npmci node install legacy
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command npm run build
|
- npmci npm test
|
||||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
- docker run
|
|
||||||
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
|
|
||||||
--volume "$PWD:/code"
|
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
|
|
||||||
artifacts:
|
|
||||||
reports:
|
|
||||||
sast: gl-sast-report.json
|
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- priv
|
allow_failure: true
|
||||||
|
|
||||||
# ====================
|
|
||||||
# test stage
|
|
||||||
# ====================
|
|
||||||
|
|
||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install lts
|
- npmci node install lts
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
|
||||||
testSTABLE:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci npm prepare
|
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci node install stable
|
- npmci npm prepare
|
||||||
- npmci npm publish
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
|
||||||
# ====================
|
|
||||||
# metadata stage
|
|
||||||
# ====================
|
|
||||||
codequality:
|
|
||||||
stage: metadata
|
|
||||||
image: docker:stable
|
|
||||||
allow_failure: true
|
|
||||||
services:
|
|
||||||
- docker:stable-dind
|
|
||||||
script:
|
|
||||||
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
|
|
||||||
- docker run
|
|
||||||
--env SOURCE_CODE="$PWD"
|
|
||||||
--volume "$PWD":/code
|
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
|
|
||||||
artifacts:
|
|
||||||
paths: [codeclimate.json]
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
- priv
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
stage: metadata
|
stage: trigger
|
||||||
script:
|
script:
|
||||||
- npmci trigger
|
- npmci trigger
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
image: hosttoday/ht-docker-node:npmci
|
image: hosttoday/ht-docker-node:npmci
|
||||||
stage: metadata
|
stage: pages
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g typedoc typescript
|
- npmci command yarn global add npmpage
|
||||||
- npmci npm prepare
|
- npmci command npmpage
|
||||||
- npmci npm install
|
|
||||||
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
|
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
- notpriv
|
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
allow_failure: true
|
|
||||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2015 Lossless GmbH
|
Copyright (c) 2015 Push.Rocks
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
39
README.md
39
README.md
@ -1,19 +1,24 @@
|
|||||||
# @pushrocks/gulp-browser
|
# gulp-browser
|
||||||
|
|
||||||
browserify and other goodies for gulp
|
browserify and other goodies for gulp
|
||||||
|
|
||||||
## Availabililty and Links
|
## Availabililty
|
||||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/gulp-browser)
|
|
||||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/gulp-browser)
|
[](https://www.npmjs.com/package/gulp-browser)
|
||||||
* [github.com (source mirror)](https://github.com/pushrocks/gulp-browser)
|
[](https://GitLab.com/pushrocks/gulp-browser)
|
||||||
* [docs (typedoc)](https://pushrocks.gitlab.io/gulp-browser/)
|
[](https://github.com/pushrocks/gulp-browser)
|
||||||
|
[](https://pushrocks.gitlab.io/gulp-browser/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
[](https://gitlab.com/pushrocks/gulp-browser/commits/master)
|
|
||||||
[](https://gitlab.com/pushrocks/gulp-browser/commits/master)
|
[](https://GitLab.com/pushrocks/gulp-browser/commits/master)
|
||||||
[](https://www.npmjs.com/package/@pushrocks/gulp-browser)
|
[](https://GitLab.com/pushrocks/gulp-browser/commits/master)
|
||||||
[](https://snyk.io/test/npm/@pushrocks/gulp-browser)
|
[](https://www.npmjs.com/package/gulp-browser)
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
[](https://david-dm.org/pushrocks/gulp-browser)
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
[](https://www.bithound.io/github/pushrocks/gulp-browser/master/dependencies/npm)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/gulp-browser)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
[](http://standardjs.com/)
|
[](http://standardjs.com/)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@ -46,12 +51,12 @@ gulp.task('gulpBrowserTest', function() {
|
|||||||
|
|
||||||
### Contributors
|
### Contributors
|
||||||
|
|
||||||
- [Phil Kunz](https://github.com/philkunz)
|
* [Phil Kunz](https://github.com/philkunz)
|
||||||
- [Steffan Donal](https://github.com/SteffanDonal)
|
* [Steffan Donal](https://github.com/SteffanDonal)
|
||||||
|
|
||||||
For further information read the linked docs at the top of this readme.
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
[](https://maintainedby.lossless.com)
|
[](https://push.rocks)
|
||||||
|
4
dist/gulpbrowser.browserify.d.ts
vendored
Normal file
4
dist/gulpbrowser.browserify.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
import * as stream from 'stream';
|
||||||
|
declare let browserify: (transforms?: any[]) => stream.Transform;
|
||||||
|
export = browserify;
|
44
dist/gulpbrowser.browserify.js
vendored
Normal file
44
dist/gulpbrowser.browserify.js
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
"use strict";
|
||||||
|
const plugins = require("./gulpbrowser.plugins");
|
||||||
|
let browserify = function (transforms = []) {
|
||||||
|
if (!Array.isArray(transforms)) {
|
||||||
|
transforms = [transforms];
|
||||||
|
}
|
||||||
|
let forEach = function (file, enc, cb) {
|
||||||
|
// do this with every chunk (file in gulp terms)
|
||||||
|
let bundleCallback = function (err, bufferedContent) {
|
||||||
|
// our bundle callback for when browserify is finished
|
||||||
|
if (Buffer.isBuffer(bufferedContent)) {
|
||||||
|
file.contents = bufferedContent;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log('gulp-browser: .browserify() ' + err.message);
|
||||||
|
cb(new Error(err.message), file);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cb(null, file);
|
||||||
|
};
|
||||||
|
if (file.contents.length > 0) {
|
||||||
|
let browserified = plugins.browserify(file, { basedir: file.base });
|
||||||
|
transforms.forEach(function (transform) {
|
||||||
|
if (typeof transform === 'function') {
|
||||||
|
browserified.transform(transform);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
browserified.transform(transform.transform, transform.options);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
browserified.bundle(bundleCallback);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.warn('gulp-browser: .browserify() file.contents appears to be empty');
|
||||||
|
cb(null, file);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let atEnd = function (cb) {
|
||||||
|
cb();
|
||||||
|
}; // no need to clean up after ourselves
|
||||||
|
return plugins.through2.obj(forEach, atEnd); // this is the through object that gets returned by gulpBrowser.browserify();
|
||||||
|
};
|
||||||
|
module.exports = browserify;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VscGJyb3dzZXIuYnJvd3NlcmlmeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2d1bHBicm93c2VyLmJyb3dzZXJpZnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLGlEQUFrRDtBQUdsRCxJQUFJLFVBQVUsR0FBRyxVQUFTLFVBQVUsR0FBRyxFQUFFO0lBQ3ZDLEVBQUUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDL0IsVUFBVSxHQUFHLENBQUMsVUFBVSxDQUFDLENBQUM7SUFDNUIsQ0FBQztJQUVELElBQUksT0FBTyxHQUFHLFVBQVMsSUFBSSxFQUFFLEdBQUcsRUFBRSxFQUFFO1FBQ2xDLGdEQUFnRDtRQUVoRCxJQUFJLGNBQWMsR0FBRyxVQUFTLEdBQUcsRUFBRSxlQUFlO1lBQ2hELHNEQUFzRDtZQUN0RCxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLGVBQWUsQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDckMsSUFBSSxDQUFDLFFBQVEsR0FBRyxlQUFlLENBQUM7WUFDbEMsQ0FBQztZQUFDLElBQUksQ0FBQyxDQUFDO2dCQUNOLE9BQU8sQ0FBQyxHQUFHLENBQUMsOEJBQThCLEdBQUcsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDO2dCQUMxRCxFQUFFLENBQUMsSUFBSSxLQUFLLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxFQUFFLElBQUksQ0FBQyxDQUFDO2dCQUNqQyxNQUFNLENBQUM7WUFDVCxDQUFDO1lBQ0QsRUFBRSxDQUFDLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQztRQUNqQixDQUFDLENBQUM7UUFFRixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQzdCLElBQUksWUFBWSxHQUFHLE9BQU8sQ0FBQyxVQUFVLENBQUMsSUFBSSxFQUFFLEVBQUUsT0FBTyxFQUFFLElBQUksQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDO1lBRXBFLFVBQVUsQ0FBQyxPQUFPLENBQUMsVUFBUyxTQUFTO2dCQUNuQyxFQUFFLENBQUMsQ0FBQyxPQUFPLFNBQVMsS0FBSyxVQUFVLENBQUMsQ0FBQyxDQUFDO29CQUNwQyxZQUFZLENBQUMsU0FBUyxDQUFDLFNBQVMsQ0FBQyxDQUFDO2dCQUNwQyxDQUFDO2dCQUFDLElBQUksQ0FBQyxDQUFDO29CQUNOLFlBQVksQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFDLFNBQVMsRUFBRSxTQUFTLENBQUMsT0FBTyxDQUFDLENBQUM7Z0JBQ2pFLENBQUM7WUFDSCxDQUFDLENBQUMsQ0FBQztZQUVILFlBQVksQ0FBQyxNQUFNLENBQUMsY0FBYyxDQUFDLENBQUM7UUFDdEMsQ0FBQztRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ04sT0FBTyxDQUFDLElBQUksQ0FBQywrREFBK0QsQ0FBQyxDQUFDO1lBQzlFLEVBQUUsQ0FBQyxJQUFJLEVBQUUsSUFBSSxDQUFDLENBQUM7UUFDakIsQ0FBQztJQUNILENBQUMsQ0FBQztJQUVGLElBQUksS0FBSyxHQUFHLFVBQVMsRUFBRTtRQUNyQixFQUFFLEVBQUUsQ0FBQztJQUNQLENBQUMsQ0FBQyxDQUFDLHNDQUFzQztJQUV6QyxNQUFNLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsT0FBTyxFQUFFLEtBQUssQ0FBQyxDQUFDLENBQUMsNkVBQTZFO0FBQzVILENBQUMsQ0FBQztBQUVGLGlCQUFTLFVBQVUsQ0FBQyJ9
|
3
dist/gulpbrowser.plugins.d.ts
vendored
Normal file
3
dist/gulpbrowser.plugins.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export import through2 = require('through2');
|
||||||
|
export import path = require('path');
|
||||||
|
export import browserify = require('browserify');
|
6
dist/gulpbrowser.plugins.js
vendored
Normal file
6
dist/gulpbrowser.plugins.js
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.through2 = require("through2");
|
||||||
|
exports.path = require("path");
|
||||||
|
exports.browserify = require("browserify");
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VscGJyb3dzZXIucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2d1bHBicm93c2VyLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx1Q0FBNkM7QUFDN0MsK0JBQXFDO0FBQ3JDLDJDQUFpRCJ9
|
1
dist/index.d.ts
vendored
Normal file
1
dist/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export import browserify = require('./gulpbrowser.browserify');
|
4
dist/index.js
vendored
Normal file
4
dist/index.js
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.browserify = require("./gulpbrowser.browserify");
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlEQUErRCJ9
|
@ -1,19 +1,7 @@
|
|||||||
{
|
{
|
||||||
"gitzone": {
|
|
||||||
"module": {
|
|
||||||
"githost": "code.foss.global",
|
|
||||||
"gitscope": "push.rocks",
|
|
||||||
"gitrepo": "gulp-browser",
|
|
||||||
"shortDescription": "browserify and other goodies for gulp",
|
|
||||||
"npmPackagename": "@push.rocks/gulp-browser",
|
|
||||||
"license": "MIT"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"npmGlobalTools": [],
|
"npmGlobalTools": [
|
||||||
"npmAccessLevel": "public"
|
"npmts"
|
||||||
},
|
]
|
||||||
"tsdocs": {
|
|
||||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
6377
package-lock.json
generated
6377
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
39
package.json
39
package.json
@ -1,13 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/gulp-browser",
|
"name": "gulp-browser",
|
||||||
"version": "3.0.19",
|
"version": "3.0.9",
|
||||||
"private": false,
|
|
||||||
"description": "browserify and other goodies for gulp",
|
"description": "browserify and other goodies for gulp",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/)",
|
"test": "(npmts)",
|
||||||
"build": "(tsbuild)"
|
"reinstall": "(rm -r node_modules && npm install)",
|
||||||
|
"release": "(git pull origin master && npm version patch && git push origin master && git checkout release && git merge master && git push origin release && git checkout master)",
|
||||||
|
"update": "(git checkout master && git pull origin master && npm install)",
|
||||||
|
"upgrade": "(npm run update) && (ncu upgradeAll && npm install)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -27,21 +29,22 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/gulp-browser",
|
"homepage": "https://gitlab.com/pushrocks/gulp-browser",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@types/browserify": "^12.0.32",
|
||||||
"@types/browserify": "^12.0.36",
|
"@types/q": "1.0.7",
|
||||||
"@types/through2": "^2.0.34",
|
"@types/through2": "^2.0.33",
|
||||||
"browserify": "^16.2.3",
|
"browserify": "^16.1.1",
|
||||||
"through2": "^3.0.0"
|
"q": "^1.5.0",
|
||||||
|
"smartq": "^1.1.8",
|
||||||
|
"through2": "^2.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.8",
|
"@types/gulp": "^4.0.4",
|
||||||
"@gitzone/tstest": "^1.0.18",
|
"babel-core": "^6.26.0",
|
||||||
"@pushrocks/gulp-function": "^3.0.1",
|
|
||||||
"@pushrocks/tapbundle": "^3.0.7",
|
|
||||||
"@types/gulp": "^4.0.5",
|
|
||||||
"babel-core": "^6.26.3",
|
|
||||||
"babel-preset-es2015": "^6.24.1",
|
"babel-preset-es2015": "^6.24.1",
|
||||||
"babelify": "^10.0.0",
|
"babelify": "^8.0.0",
|
||||||
"gulp": "^4.0.0"
|
"beautylog": "^6.1.10",
|
||||||
|
"gulp": "^3.9.1",
|
||||||
|
"gulp-function": "^2.2.9",
|
||||||
|
"tapbundle": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
29
test/test.ts
29
test/test.ts
@ -1,13 +1,14 @@
|
|||||||
|
import * as beautylog from 'beautylog';
|
||||||
import * as gulp from 'gulp';
|
import * as gulp from 'gulp';
|
||||||
import * as gulpFunction from '@pushrocks/gulp-function';
|
import * as gulpFunction from 'gulp-function';
|
||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as smartq from 'smartq';
|
||||||
|
|
||||||
import { expect, tap } from '@pushrocks/tapbundle';
|
import { expect, tap } from 'tapbundle';
|
||||||
|
|
||||||
import * as gulpBrowser from '../ts/index';
|
import * as gulpBrowser from '../ts/index';
|
||||||
|
|
||||||
tap.test('should run through smoothly', async () => {
|
tap.test('should run through smoothly', async () => {
|
||||||
let done = smartpromise.defer();
|
let done = smartq.defer();
|
||||||
let stream = gulp
|
let stream = gulp
|
||||||
.src('./test/testBrowserifyNormal.js')
|
.src('./test/testBrowserifyNormal.js')
|
||||||
.pipe(gulpBrowser.browserify())
|
.pipe(gulpBrowser.browserify())
|
||||||
@ -20,8 +21,24 @@ tap.test('should run through smoothly', async () => {
|
|||||||
await done.promise;
|
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 () => {
|
tap.test('should run through with an empty file', async () => {
|
||||||
let done = smartpromise.defer();
|
let done = smartq.defer();
|
||||||
let stream = gulp
|
let stream = gulp
|
||||||
.src('./test/testBrowserifyEmpty.js')
|
.src('./test/testBrowserifyEmpty.js')
|
||||||
.pipe(gulpBrowser.browserify())
|
.pipe(gulpBrowser.browserify())
|
||||||
@ -35,7 +52,7 @@ tap.test('should run through with an empty file', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should run through work with transforms', async () => {
|
tap.test('should run through work with transforms', async () => {
|
||||||
let done = smartpromise.defer();
|
let done = smartq.defer();
|
||||||
let transforms = [
|
let transforms = [
|
||||||
{
|
{
|
||||||
transform: 'babelify',
|
transform: 'babelify',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as stream from 'stream';
|
import * as stream from 'stream';
|
||||||
import plugins = require('./gulpbrowser.plugins');
|
import plugins = require('./gulpbrowser.plugins');
|
||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as q from 'q';
|
||||||
|
|
||||||
let browserify = function(transforms = []) {
|
let browserify = function(transforms = []) {
|
||||||
if (!Array.isArray(transforms)) {
|
if (!Array.isArray(transforms)) {
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"experimentalDecorators": true,
|
|
||||||
"useDefineForClassFields": false,
|
|
||||||
"target": "ES2022",
|
|
||||||
"module": "NodeNext",
|
|
||||||
"moduleResolution": "NodeNext",
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"verbatimModuleSyntax": true
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist_*/**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
3
tslint.json
Normal file
3
tslint.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "tslint-config-standard"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user