Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
9cd24695db | |||
46c79e711b | |||
4b07c9951f | |||
559b5553eb | |||
87ceed6f8f | |||
ee36914a42 | |||
7dc6cdb250 | |||
3ea6585992 | |||
0f0592cdaf |
@ -1,6 +1,11 @@
|
||||
# standard ci
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .yarn/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
|
||||
stages:
|
||||
- test
|
||||
- release
|
||||
@ -11,6 +16,7 @@ testLEGACY:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test legacy
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
@ -19,6 +25,7 @@ testLTS:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test lts
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
@ -26,6 +33,7 @@ testSTABLE:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test stable
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
@ -52,11 +60,11 @@ pages:
|
||||
stage: pages
|
||||
script:
|
||||
- npmci command yarn global add npmpage
|
||||
- npmci command npmpage
|
||||
only:
|
||||
- tags
|
||||
- npmci command npmpage --publish gitlab
|
||||
tags:
|
||||
- docker
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1,8 +1,8 @@
|
||||
"use strict";
|
||||
/* ================================================== *
|
||||
**** NPMTS ****
|
||||
Fabulous TypeScript development
|
||||
* ================================================== */
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const early = require("early");
|
||||
early.start('NPMTS');
|
||||
|
2
dist/mod00/mod00.check.js
vendored
2
dist/mod00/mod00.check.js
vendored
@ -85,7 +85,7 @@ let checkDevDependencies = (configArg) => {
|
||||
plugins.beautylog.log(`unused devDependency ${item}`);
|
||||
}
|
||||
for (let item in unused.missing) {
|
||||
plugins.beautylog.error(`unused devDependency ${item}`);
|
||||
plugins.beautylog.error(`missing devDependency ${item}`);
|
||||
}
|
||||
if (unused.missing.length > 0) {
|
||||
plugins.beautylog.info('exiting due to missing dependencies in package.json');
|
||||
|
12
dist/mod02/index.js
vendored
12
dist/mod02/index.js
vendored
@ -28,7 +28,7 @@ let tap = function (configArg) {
|
||||
* handle the testable files
|
||||
*/
|
||||
let testableFilesSmartstream = new plugins.smartstream.Smartstream([
|
||||
plugins.gulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]),
|
||||
plugins.smartgulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]),
|
||||
plugins.gulpSourcemaps.init(),
|
||||
plugins.gulpTypeScript({
|
||||
target: 'ES5',
|
||||
@ -47,7 +47,7 @@ let tap = function (configArg) {
|
||||
* handle the test files
|
||||
*/
|
||||
let testFilesSmartstream = new plugins.smartstream.Smartstream([
|
||||
plugins.gulp.src([plugins.path.join(paths.cwd, 'test/*.ts')]),
|
||||
plugins.smartgulp.src([plugins.path.join(paths.cwd, 'test/*.ts')]),
|
||||
plugins.gulpTypeScript({
|
||||
target: 'ES5',
|
||||
emitDecoratorMetadata: true,
|
||||
@ -77,7 +77,13 @@ let tap = function (configArg) {
|
||||
return done.promise;
|
||||
};
|
||||
let handleCoverageData = (configArg) => __awaiter(this, void 0, void 0, function* () {
|
||||
let coverageResult = yield plugins.smartcov.get.percentageFromLcovString(configArg.runData.coverageLcovInfo, 2);
|
||||
let coverageResult = 0; // the coverage in percent
|
||||
if (configArg.runData.coverageLcovInfo) {
|
||||
coverageResult = yield plugins.smartcov.get.percentageFromLcovString(configArg.runData.coverageLcovInfo, 2);
|
||||
}
|
||||
else {
|
||||
plugins.beautylog.warn('Hey... Did your tests import and use your module that you are trying to test?');
|
||||
}
|
||||
if (coverageResult >= configArg.coverageTreshold) {
|
||||
plugins.beautylog.ok(`${(coverageResult).toString()}% `
|
||||
+ `coverage exceeds your treshold of `
|
||||
|
4
dist/mod02/mod02.plugins.d.ts
vendored
4
dist/mod02/mod02.plugins.d.ts
vendored
@ -1,8 +1,8 @@
|
||||
export * from '../npmts.plugins';
|
||||
import * as gulp from 'gulp';
|
||||
import * as gulpFunction from 'gulp-function';
|
||||
import * as gulpSourcemaps from 'gulp-sourcemaps';
|
||||
import * as gulpTypeScript from 'gulp-typescript';
|
||||
import * as smartcov from 'smartcov';
|
||||
import * as smartgulp from 'smartgulp';
|
||||
import * as tapbuffer from 'tapbuffer';
|
||||
export { gulp, gulpFunction, gulpSourcemaps, gulpTypeScript, smartcov, tapbuffer };
|
||||
export { gulpFunction, gulpSourcemaps, gulpTypeScript, smartcov, smartgulp, tapbuffer };
|
||||
|
4
dist/mod02/mod02.plugins.js
vendored
4
dist/mod02/mod02.plugins.js
vendored
@ -4,8 +4,6 @@ function __export(m) {
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("../npmts.plugins"));
|
||||
const gulp = require("gulp");
|
||||
exports.gulp = gulp;
|
||||
const gulpFunction = require("gulp-function");
|
||||
exports.gulpFunction = gulpFunction;
|
||||
const gulpSourcemaps = require("gulp-sourcemaps");
|
||||
@ -14,5 +12,7 @@ const gulpTypeScript = require("gulp-typescript");
|
||||
exports.gulpTypeScript = gulpTypeScript;
|
||||
const smartcov = require("smartcov");
|
||||
exports.smartcov = smartcov;
|
||||
const smartgulp = require("smartgulp");
|
||||
exports.smartgulp = smartgulp;
|
||||
const tapbuffer = require("tapbuffer");
|
||||
exports.tapbuffer = tapbuffer;
|
||||
|
21
package.json
21
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "npmts",
|
||||
"version": "7.0.13",
|
||||
"version": "7.0.17",
|
||||
"description": "Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
@ -34,15 +34,13 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/gitzone/npmts#readme",
|
||||
"dependencies": {
|
||||
"@types/gulp": "^4.0.2",
|
||||
"@types/gulp-sourcemaps": "0.0.30",
|
||||
"@types/minimatch": "^2.0.29",
|
||||
"@types/through2": "^2.0.32",
|
||||
"beautylog": "6.1.5",
|
||||
"beautylog": "6.1.10",
|
||||
"depcheck": "^0.6.7",
|
||||
"early": "^2.0.38",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-function": "^2.2.3",
|
||||
"early": "^2.1.1",
|
||||
"gulp-function": "^2.2.9",
|
||||
"gulp-sourcemaps": "^2.6.0",
|
||||
"gulp-typescript": "^3.1.6",
|
||||
"lodash": "^4.17.4",
|
||||
@ -50,20 +48,21 @@
|
||||
"projectinfo": "^3.0.2",
|
||||
"smartanalytics": "^1.0.6",
|
||||
"smartchok": "^1.0.8",
|
||||
"smartcli": "^2.0.1",
|
||||
"smartcli": "^2.0.6",
|
||||
"smartcov": "^1.0.2",
|
||||
"smartfile": "^4.1.9",
|
||||
"smartfile": "^4.2.7",
|
||||
"smartgulp": "^1.0.5",
|
||||
"smartpath": "^3.2.8",
|
||||
"smartq": "^1.1.1",
|
||||
"smartstream": "^1.0.8",
|
||||
"smartstring": "^2.0.24",
|
||||
"smartsystem": "^1.0.12",
|
||||
"source-map-support": "^0.4.14",
|
||||
"source-map-support": "^0.4.15",
|
||||
"tapbuffer": "^1.0.11",
|
||||
"through2": "^2.0.3",
|
||||
"tsn": "^2.0.15",
|
||||
"typescript": "^2.2.2",
|
||||
"typings-global": "^1.0.14"
|
||||
"typescript": "^2.3.2",
|
||||
"typings-global": "^1.0.16"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
10
readme.md
10
readme.md
@ -11,9 +11,9 @@ Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.
|
||||
[](https://GitLab.com/gitzone/npmts/commits/master)
|
||||
[](https://GitLab.com/gitzone/npmts/commits/master)
|
||||
[](https://www.npmjs.com/package/npmts)
|
||||
[](https://david-dm.org/gitzone/npmts)
|
||||
[](https://www.bithound.io/github/gitzone/npmts/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/gitzone/npmts)
|
||||
[](https://david-dm.org/gitzonetools/npmts)
|
||||
[](https://www.bithound.io/github/gitzonetools/npmts/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/gitzonetools/npmts)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](http://standardjs.com/)
|
||||
@ -33,7 +33,9 @@ For more information on how tests are run check out the [tapbuffer module](https
|
||||
This works on your machine and in CI. There is a prebuild docker image available that includes npmts to make CI a breeze:
|
||||
[hosttoday/ht-docker-node:npmts on Dockerhub](https://hub.docker.com/r/hosttoday/ht-docker-node/)
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
|
||||
[](https://git.zone)
|
||||
[](https://push.rocks)
|
||||
|
@ -89,7 +89,7 @@ let checkDevDependencies = (configArg) => {
|
||||
plugins.beautylog.log(`unused devDependency ${item}`)
|
||||
}
|
||||
for (let item in unused.missing) {
|
||||
plugins.beautylog.error(`unused devDependency ${item}`)
|
||||
plugins.beautylog.error(`missing devDependency ${item}`)
|
||||
}
|
||||
if (unused.missing.length > 0) {
|
||||
plugins.beautylog.info('exiting due to missing dependencies in package.json')
|
||||
|
@ -24,7 +24,7 @@ let tap = function (configArg: INpmtsConfig) {
|
||||
* handle the testable files
|
||||
*/
|
||||
let testableFilesSmartstream = new plugins.smartstream.Smartstream([
|
||||
plugins.gulp.src([ plugins.path.join(paths.cwd, './ts/**/*.ts') ]),
|
||||
plugins.smartgulp.src([ plugins.path.join(paths.cwd, './ts/**/*.ts') ]),
|
||||
plugins.gulpSourcemaps.init(),
|
||||
plugins.gulpTypeScript({
|
||||
target: 'ES5',
|
||||
@ -44,7 +44,7 @@ let tap = function (configArg: INpmtsConfig) {
|
||||
* handle the test files
|
||||
*/
|
||||
let testFilesSmartstream = new plugins.smartstream.Smartstream([
|
||||
plugins.gulp.src([ plugins.path.join(paths.cwd, 'test/*.ts') ]),
|
||||
plugins.smartgulp.src([ plugins.path.join(paths.cwd, 'test/*.ts') ]),
|
||||
plugins.gulpTypeScript({
|
||||
target: 'ES5',
|
||||
emitDecoratorMetadata: true,
|
||||
@ -77,10 +77,16 @@ let tap = function (configArg: INpmtsConfig) {
|
||||
}
|
||||
|
||||
let handleCoverageData = async (configArg: INpmtsConfig) => {
|
||||
let coverageResult = await plugins.smartcov.get.percentageFromLcovString(
|
||||
let coverageResult: number = 0 // the coverage in percent
|
||||
if (configArg.runData.coverageLcovInfo) {
|
||||
coverageResult = await plugins.smartcov.get.percentageFromLcovString(
|
||||
configArg.runData.coverageLcovInfo,
|
||||
2
|
||||
)
|
||||
} else {
|
||||
plugins.beautylog.warn('Hey... Did your tests import and use your module that you are trying to test?')
|
||||
}
|
||||
|
||||
if (coverageResult >= configArg.coverageTreshold) {
|
||||
plugins.beautylog.ok(
|
||||
`${(coverageResult).toString()}% `
|
||||
|
@ -1,17 +1,17 @@
|
||||
export * from '../npmts.plugins'
|
||||
|
||||
import * as gulp from 'gulp'
|
||||
import * as gulpFunction from 'gulp-function'
|
||||
import * as gulpSourcemaps from 'gulp-sourcemaps'
|
||||
import * as gulpTypeScript from 'gulp-typescript'
|
||||
import * as smartcov from 'smartcov'
|
||||
import * as smartgulp from 'smartgulp'
|
||||
import * as tapbuffer from 'tapbuffer'
|
||||
|
||||
export {
|
||||
gulp,
|
||||
gulpFunction,
|
||||
gulpSourcemaps,
|
||||
gulpTypeScript,
|
||||
smartcov,
|
||||
smartgulp,
|
||||
tapbuffer
|
||||
}
|
||||
|
Reference in New Issue
Block a user