Compare commits

...

26 Commits

Author SHA1 Message Date
c0b7dc2547 8.0.25 2017-11-25 20:57:51 +02:00
d65f19d108 update deps 2017-11-25 20:57:40 +02:00
5de4646453 8.0.24 2017-10-07 13:55:12 +02:00
44e9fcc977 update dependencies 2017-10-07 13:55:06 +02:00
784aec1ec3 8.0.23 2017-10-05 14:58:52 +02:00
61b7bbb168 change lib inclusion for tests 2017-10-05 14:58:49 +02:00
1d662ddef4 8.0.22 2017-09-23 00:00:27 +02:00
f7351c914e update dependencies 2017-09-23 00:00:25 +02:00
7132ae11a8 fix ci 2017-09-13 17:48:15 +02:00
b195b8911b switch position of mirror 2017-09-13 17:47:30 +02:00
e331e870d9 8.0.21 2017-09-13 17:44:34 +02:00
3a6bd3b583 now working when npms.io is down 2017-09-13 17:44:31 +02:00
594bccfc82 8.0.20 2017-09-11 14:30:36 +02:00
d9f1d36d14 update dependencies 2017-09-11 14:30:32 +02:00
f12c4aabd8 8.0.19 2017-09-08 18:04:44 +02:00
b62f7d8b31 update tracking domains 2017-09-08 18:04:40 +02:00
56cccb1b14 8.0.18 2017-09-08 15:13:29 +02:00
850df45d7f add mirror stage 2017-09-08 15:13:27 +02:00
2b1f371d8a 8.0.17 2017-09-06 15:59:40 +02:00
8196ca50a7 update readme 2017-09-06 15:59:27 +02:00
ad96661dda update structure docs 2017-09-06 15:52:46 +02:00
2fc6c3d358 8.0.16 2017-09-05 18:48:16 +02:00
0c74fb3343 update docs 2017-09-05 18:48:12 +02:00
d821a2efa6 update indention 2017-08-31 20:48:30 +02:00
66f2321d99 8.0.15 2017-08-29 16:17:52 +02:00
816f4f57fb update ci 2017-08-29 16:17:46 +02:00
10 changed files with 321 additions and 381 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.nogit/
node_modules/ node_modules/
test/ test/
pages/ pages/

View File

@ -7,15 +7,26 @@ cache:
key: "$CI_BUILD_STAGE" key: "$CI_BUILD_STAGE"
stages: stages:
- mirror
- test - test
- release - release
- trigger - trigger
- pages - pages
mirror:
image: hosttoday/ht-docker-node:npmci
stage: mirror
script:
- npmci git mirror
tags:
- docker
testLEGACY: testLEGACY:
stage: test stage: test
script: script:
- npmci test legacy - npmci node install legacy
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
@ -24,7 +35,9 @@ testLEGACY:
testLTS: testLTS:
stage: test stage: test
script: script:
- npmci test lts - npmci node install lts
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
@ -32,7 +45,9 @@ testLTS:
testSTABLE: testSTABLE:
stage: test stage: test
script: script:
- npmci test stable - npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
@ -40,7 +55,8 @@ testSTABLE:
release: release:
stage: release stage: release
script: script:
- npmci publish - npmci npm prepare
- npmci npm publish
only: only:
- tags - tags
tags: tags:

23
dist/mod02/index.js vendored
View File

@ -14,6 +14,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./mod02.plugins"); const plugins = require("./mod02.plugins");
const paths = require("../npmts.paths"); const paths = require("../npmts.paths");
const q = require("smartq"); const q = require("smartq");
let testTypeScriptConfig = {
target: 'ES5',
emitDecoratorMetadata: true,
experimentalDecorators: true,
lib: [
'DOM',
'ESNext'
]
};
/** /**
* runs mocha * runs mocha
* @returns INpmtsConfig * @returns INpmtsConfig
@ -31,12 +40,7 @@ let tap = function (configArg) {
let testableFilesSmartstream = new plugins.smartstream.Smartstream([ let testableFilesSmartstream = new plugins.smartstream.Smartstream([
plugins.smartgulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]), plugins.smartgulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]),
plugins.gulpSourcemaps.init(), plugins.gulpSourcemaps.init(),
plugins.gulpTypeScript({ plugins.gulpTypeScript(testTypeScriptConfig),
target: 'ES5',
emitDecoratorMetadata: true,
experimentalDecorators: true,
lib: ['DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable']
}),
plugins.gulpSourcemaps.write(), plugins.gulpSourcemaps.write(),
npmtsTapBuffer.pipeTestableFiles(), npmtsTapBuffer.pipeTestableFiles(),
plugins.smartstream.cleanPipe() plugins.smartstream.cleanPipe()
@ -47,12 +51,7 @@ let tap = function (configArg) {
let testFilesSmartstream = new plugins.smartstream.Smartstream([ let testFilesSmartstream = new plugins.smartstream.Smartstream([
plugins.smartgulp.src([plugins.path.join(paths.cwd, 'test/*.ts')]), plugins.smartgulp.src([plugins.path.join(paths.cwd, 'test/*.ts')]),
plugins.gulpSourcemaps.init(), plugins.gulpSourcemaps.init(),
plugins.gulpTypeScript({ plugins.gulpTypeScript(testTypeScriptConfig),
target: 'ES5',
emitDecoratorMetadata: true,
experimentalDecorators: true,
lib: ['DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable']
}),
plugins.gulpSourcemaps.write(), plugins.gulpSourcemaps.write(),
npmtsTapBuffer.pipeTestFiles(), npmtsTapBuffer.pipeTestFiles(),
plugins.smartstream.cleanPipe() plugins.smartstream.cleanPipe()

2
dist/npmts.cli.js vendored
View File

@ -27,7 +27,7 @@ const NpmtsShip = require("./npmts.ship");
* Our privacy policy can be found here: https://lossless.gmbh/privacy.html * Our privacy policy can be found here: https://lossless.gmbh/privacy.html
*/ */
let npmtsAnalytics = new plugins.smartanalytics.Analytics({ let npmtsAnalytics = new plugins.smartanalytics.Analytics({
apiEndPoint: 'https://pubapi-1.lossless.one/analytics', apiEndPoint: 'https://pubapi.lossless.one/analytics',
projectId: 'gitzone', projectId: 'gitzone',
appName: 'npmts' appName: 'npmts'
}); });

26
docs/structure.md Normal file
View File

@ -0,0 +1,26 @@
---
name: npmts project structure
description: how npmts projects are structured
---
# npmts - Project Structure
**locally**
```text
projectroot
|- .nogit/ # contains files that should not be checked into git - NOgit
|- dist/ # contains compiled js files and their corresponding typings - git
|- node_modules/ # contains the installed node modules - NOgit
|- test/ # contains the test files - git
|- ts/ # contains the source TypeScript files - git
|
|- .gitignore # the normal gitignore file
|- .gitlab-ci.yml # the gitlab ci yml file
|- npmextra.json # npmextra.json
|- package.json # the standard npm module package.json file
|- readme.md # the standard project readme
|- tslint.json # the standard tslint.json for TypeScript
|- yarn.lock # yarn.lock - the standard yarn.lock file
```
**in git**

View File

@ -1,6 +1,6 @@
{ {
"name": "npmts", "name": "npmts",
"version": "8.0.14", "version": "8.0.25",
"description": "best practice npm TypeScript modules", "description": "best practice npm TypeScript modules",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {
@ -34,36 +34,36 @@
}, },
"homepage": "https://gitlab.com/gitzone/npmts#readme", "homepage": "https://gitlab.com/gitzone/npmts#readme",
"dependencies": { "dependencies": {
"@types/gulp-sourcemaps": "0.0.31", "@types/gulp-sourcemaps": "0.0.32",
"@types/minimatch": "^3.0.1", "@types/minimatch": "^3.0.1",
"@types/through2": "^2.0.33", "@types/through2": "^2.0.33",
"beautylog": "^6.1.10", "beautylog": "^6.1.10",
"depcheck": "^0.6.7", "depcheck": "^0.6.8",
"early": "^2.1.1", "early": "^2.1.1",
"gulp-function": "^2.2.9", "gulp-function": "^2.2.9",
"gulp-sourcemaps": "^2.6.1", "gulp-sourcemaps": "^2.6.1",
"gulp-typescript": "^3.2.2", "gulp-typescript": "^3.2.3",
"lodash": "^4.17.4", "lodash": "^4.17.4",
"npmextra": "^2.0.9", "npmextra": "^2.0.9",
"projectinfo": "^3.0.2", "projectinfo": "^3.0.4",
"smartanalytics": "^2.0.8", "smartanalytics": "^2.0.9",
"smartchok": "^1.0.11", "smartchok": "^1.0.11",
"smartcli": "^2.0.7", "smartcli": "^2.0.9",
"smartcov": "^1.0.2", "smartcov": "^1.0.2",
"smarterror": "^1.0.3", "smarterror": "^1.0.3",
"smartfile": "^4.2.20", "smartfile": "^4.2.26",
"smartgulp": "^1.0.6", "smartgulp": "^1.0.6",
"smartpath": "^3.2.8", "smartpath": "^3.2.8",
"smartq": "^1.1.6", "smartq": "^1.1.6",
"smartstream": "^1.0.10", "smartstream": "^1.0.10",
"smartstring": "^2.0.24", "smartstring": "^2.0.28",
"smartsystem": "^2.0.2", "smartsystem": "^2.0.2",
"smartupdate": "^1.0.10", "smartupdate": "^1.0.13",
"tapbuffer": "^1.0.29", "tapbuffer": "^1.0.29",
"through2": "^2.0.3", "through2": "^2.0.3",
"tsn": "^2.0.15", "tsn": "^2.0.15",
"typescript": "^2.4.2", "typescript": "^2.6.1",
"typings-global": "^1.0.20" "typings-global": "^1.0.23"
}, },
"devDependencies": {} "devDependencies": {}
} }

View File

@ -10,6 +10,16 @@ import * as q from 'smartq'
import { INpmtsConfig } from '../npmts.config' import { INpmtsConfig } from '../npmts.config'
import { Smartfile } from 'smartfile' import { Smartfile } from 'smartfile'
let testTypeScriptConfig = {
target: 'ES5',
emitDecoratorMetadata: true,
experimentalDecorators: true,
lib: [
'DOM',
'ESNext'
]
}
/** /**
* runs mocha * runs mocha
* @returns INpmtsConfig * @returns INpmtsConfig
@ -30,12 +40,7 @@ let tap = function (configArg: INpmtsConfig) {
let testableFilesSmartstream = new plugins.smartstream.Smartstream([ let testableFilesSmartstream = new plugins.smartstream.Smartstream([
plugins.smartgulp.src([ plugins.path.join(paths.cwd, './ts/**/*.ts') ]), plugins.smartgulp.src([ plugins.path.join(paths.cwd, './ts/**/*.ts') ]),
plugins.gulpSourcemaps.init(), plugins.gulpSourcemaps.init(),
plugins.gulpTypeScript({ plugins.gulpTypeScript(testTypeScriptConfig),
target: 'ES5',
emitDecoratorMetadata: true,
experimentalDecorators: true,
lib: [ 'DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable' ]
}),
plugins.gulpSourcemaps.write(), plugins.gulpSourcemaps.write(),
npmtsTapBuffer.pipeTestableFiles(), npmtsTapBuffer.pipeTestableFiles(),
plugins.smartstream.cleanPipe() plugins.smartstream.cleanPipe()
@ -47,12 +52,7 @@ let tap = function (configArg: INpmtsConfig) {
let testFilesSmartstream = new plugins.smartstream.Smartstream([ let testFilesSmartstream = new plugins.smartstream.Smartstream([
plugins.smartgulp.src([ plugins.path.join(paths.cwd, 'test/*.ts') ]), plugins.smartgulp.src([ plugins.path.join(paths.cwd, 'test/*.ts') ]),
plugins.gulpSourcemaps.init(), plugins.gulpSourcemaps.init(),
plugins.gulpTypeScript({ plugins.gulpTypeScript(testTypeScriptConfig),
target: 'ES5',
emitDecoratorMetadata: true,
experimentalDecorators: true,
lib: [ 'DOM', 'ES5', 'ES2015.Promise', 'ES2015.Generator', 'ES2015.Iterable' ]
}),
plugins.gulpSourcemaps.write(), plugins.gulpSourcemaps.write(),
npmtsTapBuffer.pipeTestFiles(), npmtsTapBuffer.pipeTestFiles(),
plugins.smartstream.cleanPipe() plugins.smartstream.cleanPipe()

View File

@ -19,7 +19,7 @@ import * as NpmtsShip from './npmts.ship'
* Our privacy policy can be found here: https://lossless.gmbh/privacy.html * Our privacy policy can be found here: https://lossless.gmbh/privacy.html
*/ */
let npmtsAnalytics = new plugins.smartanalytics.Analytics({ let npmtsAnalytics = new plugins.smartanalytics.Analytics({
apiEndPoint: 'https://pubapi-1.lossless.one/analytics', apiEndPoint: 'https://pubapi.lossless.one/analytics',
projectId: 'gitzone', projectId: 'gitzone',
appName: 'npmts' appName: 'npmts'
}) })

View File

@ -8,27 +8,27 @@ import { INpmtsConfig } from './npmts.config'
let npmtsSmartchok: smartchok.Smartchok = null let npmtsSmartchok: smartchok.Smartchok = null
export let run = (configArg: INpmtsConfig) => { export let run = (configArg: INpmtsConfig) => {
let done = q.defer() let done = q.defer()
if (configArg.watch && npmtsSmartchok === null) { if (configArg.watch && npmtsSmartchok === null) {
let pathsToWatch: string[] = [] let pathsToWatch: string[] = []
for (let key in configArg.ts) { for (let key in configArg.ts) {
pathsToWatch.push(key) pathsToWatch.push(key)
}
for (let key in configArg.testTs) {
pathsToWatch.push(key)
}
npmtsSmartchok = new smartchok.Smartchok(pathsToWatch)
npmtsSmartchok.getObservableFor('change').then((changeObservableArg) => {
plugins.beautylog.info('now watching...')
changeObservableArg.subscribe(() => {
cli.run()
})
})
npmtsSmartchok.start()
done.resolve(configArg)
} else {
plugins.beautylog.info('not watching')
done.resolve(configArg)
} }
return done.promise for (let key in configArg.testTs) {
pathsToWatch.push(key)
}
npmtsSmartchok = new smartchok.Smartchok(pathsToWatch)
npmtsSmartchok.getObservableFor('change').then((changeObservableArg) => {
plugins.beautylog.info('now watching...')
changeObservableArg.subscribe(() => {
cli.run()
})
})
npmtsSmartchok.start()
done.resolve(configArg)
} else {
plugins.beautylog.info('not watching')
done.resolve(configArg)
}
return done.promise
} }

532
yarn.lock

File diff suppressed because it is too large Load Diff