Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
9cd24695db | |||
46c79e711b | |||
4b07c9951f | |||
559b5553eb | |||
87ceed6f8f | |||
ee36914a42 | |||
7dc6cdb250 |
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 'smartgulp';
|
||||
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("smartgulp");
|
||||
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;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "npmts",
|
||||
"version": "7.0.14",
|
||||
"version": "7.0.17",
|
||||
"description": "Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
@ -50,8 +50,8 @@
|
||||
"smartchok": "^1.0.8",
|
||||
"smartcli": "^2.0.6",
|
||||
"smartcov": "^1.0.2",
|
||||
"smartfile": "^4.2.4",
|
||||
"smartgulp": "^1.0.4",
|
||||
"smartfile": "^4.2.7",
|
||||
"smartgulp": "^1.0.5",
|
||||
"smartpath": "^3.2.8",
|
||||
"smartq": "^1.1.1",
|
||||
"smartstream": "^1.0.8",
|
||||
|
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 'smartgulp'
|
||||
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
|
||||
}
|
||||
|
14
yarn.lock
14
yarn.lock
@ -2317,9 +2317,9 @@ smartfile@4.1.6:
|
||||
vinyl "^2.0.1"
|
||||
vinyl-file "^3.0.0"
|
||||
|
||||
smartfile@^4.1.4, smartfile@^4.1.7, smartfile@^4.1.9, smartfile@^4.2.4:
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.2.4.tgz#5b53324f3d7f0b3fb2dffb134b32808da89b4dee"
|
||||
smartfile@^4.1.4, smartfile@^4.1.7, smartfile@^4.1.9, smartfile@^4.2.6, smartfile@^4.2.7:
|
||||
version "4.2.7"
|
||||
resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.2.7.tgz#38f250d2bb046481f347e5a27f6c8ca4d5dc15a2"
|
||||
dependencies:
|
||||
"@types/fs-extra" "2.x.x"
|
||||
"@types/vinyl" "^2.0.0"
|
||||
@ -2334,14 +2334,14 @@ smartfile@^4.1.4, smartfile@^4.1.7, smartfile@^4.1.9, smartfile@^4.2.4:
|
||||
vinyl "^2.0.2"
|
||||
vinyl-file "^3.0.0"
|
||||
|
||||
smartgulp@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/smartgulp/-/smartgulp-1.0.4.tgz#e65814d13f65cc476a7f557de1ee42e9d5d06210"
|
||||
smartgulp@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/smartgulp/-/smartgulp-1.0.5.tgz#495c41d4f11e16ef911d1d162275f4f68b00de6b"
|
||||
dependencies:
|
||||
"@types/lodash" "^4.14.63"
|
||||
lodash "^4.17.4"
|
||||
smartevent "^1.0.1"
|
||||
smartfile "^4.2.4"
|
||||
smartfile "^4.2.6"
|
||||
smartq "^1.1.1"
|
||||
smartstream "^1.0.8"
|
||||
typings-global "^1.0.16"
|
||||
|
Reference in New Issue
Block a user