Compare commits
98 Commits
Author | SHA1 | Date | |
---|---|---|---|
e3fa407c1c | |||
865e58b190 | |||
66d00d938c | |||
5c3e165625 | |||
82e282a19f | |||
16ca87923d | |||
62676cf816 | |||
c88bb03e6c | |||
98f9c51613 | |||
a0b237ca8c | |||
4a7139b6f8 | |||
48f9249313 | |||
278eda4869 | |||
ce99e04b45 | |||
c0a1e0a14f | |||
83392d18f6 | |||
270cb2533e | |||
fad367ca0b | |||
836f8d18b0 | |||
ce269ae337 | |||
727d26fae4 | |||
0f2b71ebc3 | |||
638c1a8c8c | |||
c54644949e | |||
53c26d4634 | |||
e3b1ec0633 | |||
1892bd6df1 | |||
20bdf70686 | |||
7787330d63 | |||
67c3efdd59 | |||
7655ba749a | |||
0a089b6f10 | |||
29bf694db6 | |||
019d8deadd | |||
bfef45cab3 | |||
eddc64b891 | |||
e47df19015 | |||
af96ab531b | |||
b96206e8f7 | |||
f96bfc0875 | |||
62f3dbabda | |||
5486e268ed | |||
6d61043379 | |||
ac92f355d4 | |||
140bfb4f5e | |||
4ed87cac7e | |||
d2182a6d0f | |||
b7e48313e1 | |||
9f8e30526f | |||
8dd5c97f3b | |||
58b6a9a328 | |||
1c4020824d | |||
521e5740e5 | |||
ce76702d53 | |||
4590c8f64e | |||
ab7155f198 | |||
feba451f90 | |||
1ba1b0447b | |||
e4db3ba7ee | |||
da209ecc06 | |||
e010b01c42 | |||
225c46a788 | |||
7883f1cb7d | |||
394dd88a1d | |||
1d8fee1506 | |||
88d5409c40 | |||
b8c9508d21 | |||
59f97c3254 | |||
0491493b2e | |||
aca45165f8 | |||
569c597f8b | |||
5f17ea48ed | |||
6a9cdd297a | |||
0a363b441c | |||
3af6edd5e6 | |||
9a26f1367d | |||
15dd17e7a7 | |||
3b704dbde5 | |||
48aeb16dfd | |||
b40d8452ec | |||
d8281f098a | |||
3ffee9d0d6 | |||
03dfdda812 | |||
24cce5d9b2 | |||
295e568097 | |||
846bcf66db | |||
fc7d7fd27f | |||
9829c7bb1e | |||
6827999cf8 | |||
b318fa2076 | |||
0c751e1bca | |||
cb489552f2 | |||
addd66091f | |||
c2f8199f0b | |||
5e5696cce1 | |||
44d9782487 | |||
41592a4d2f | |||
23367249ec |
22
.gitignore
vendored
22
.gitignore
vendored
@ -1,4 +1,20 @@
|
|||||||
node_modules/
|
.nogit/
|
||||||
docs/
|
|
||||||
|
# artifacts
|
||||||
coverage/
|
coverage/
|
||||||
ts/typings/
|
public/
|
||||||
|
pages/
|
||||||
|
|
||||||
|
# installs
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# caches
|
||||||
|
.yarn/
|
||||||
|
.cache/
|
||||||
|
.rpt2_cache
|
||||||
|
|
||||||
|
# builds
|
||||||
|
dist/
|
||||||
|
dist_*/
|
||||||
|
|
||||||
|
# custom
|
125
.gitlab-ci.yml
Normal file
125
.gitlab-ci.yml
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
# gitzone ci_default
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .npmci_cache/
|
||||||
|
key: '$CI_BUILD_STAGE'
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- security
|
||||||
|
- test
|
||||||
|
- release
|
||||||
|
- metadata
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# security stage
|
||||||
|
# ====================
|
||||||
|
mirror:
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci git mirror
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
|
audit:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci command npm install --ignore-scripts
|
||||||
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
- npmci command npm audit --audit-level=high
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# test stage
|
||||||
|
# ====================
|
||||||
|
|
||||||
|
testStable:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
testBuild:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command npm run build
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
release:
|
||||||
|
stage: release
|
||||||
|
script:
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm publish
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# metadata stage
|
||||||
|
# ====================
|
||||||
|
codequality:
|
||||||
|
stage: metadata
|
||||||
|
allow_failure: true
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
script:
|
||||||
|
- npmci command npm install -g tslint typescript
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- priv
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
stage: metadata
|
||||||
|
script:
|
||||||
|
- npmci trigger
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
|
pages:
|
||||||
|
stage: metadata
|
||||||
|
script:
|
||||||
|
- npmci node install lts
|
||||||
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command tsdoc
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
artifacts:
|
||||||
|
expire_in: 1 week
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
allow_failure: true
|
@ -1,4 +0,0 @@
|
|||||||
docs/
|
|
||||||
coverage/
|
|
||||||
ts/typings/
|
|
||||||
.travis.yml
|
|
12
.travis.yml
12
.travis.yml
@ -1,12 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- '4'
|
|
||||||
- stable
|
|
||||||
deploy:
|
|
||||||
provider: npm
|
|
||||||
email: npm@lossless.digital
|
|
||||||
api_key:
|
|
||||||
secure: WmJJw1aJ1kbTOtArdBvgtYEcEk2899hiPc/XnCoUrHz45DAgnAES4eVUbhI5AC78tjnKc+iqbB9e5+vziSW4G5P4KAuP0CYLd5v4G5ZC4IYigFPxroIib7wFtGoOlhe8AItLDMdYO2KcPYXVpZzaITj2FlfNjoqg5UiKnSVShKwUALQk6JdZ345d0iwyr2nmNA6m0FJhcO2weY3BEDRyPWuody/FEoVZ3I2Q1f3R50v3Kb7Nzfn0uob5ABjux4YZ4xJ6tNeJkU021tSgJhjqfwbVMoIVJohwa5jlaqXdMQvWWKvhOAFyDj6zOJ1BnIuVYltDoWczuPi3+YVtFoc2+rYdSXYUcK1aCfVQZ8DDYYzlZ9Sp1vxiy8D3RZuNkLzUImranCDl6r6EYTxEw2L2bAowo9wLZtnht/mlRvOOLM9ZYVi0yr7Cd9FhVfiLZO97OGybfTFvih+nbMZGk5/RVeQzYzsycgeNT96ii5+de0yerbD690Qf+Kap5IlS5Fyvo2Y/SVQ3nxgQt7Pa4bTLbMwzSmXoBgUO6j6d8Qv7fPGQvbOQJEGJaZDaqpgxxS7WIc2YtwLXXob757BxKNW6Y6xPCcTqX7lMqfyQa194EjPTNTK+O0YnGAFFnXps/uCc8ccH3z3x6IrAAQpPx68gPERiWMf2WiPsMoh+kH4UzLc=
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
repo: pushrocks/early
|
|
29
.vscode/launch.json
vendored
Normal file
29
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "current file",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [
|
||||||
|
"${relativeFile}"
|
||||||
|
],
|
||||||
|
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"protocol": "inspector",
|
||||||
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "test.ts",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [
|
||||||
|
"test/test.ts"
|
||||||
|
],
|
||||||
|
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"protocol": "inspector",
|
||||||
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
26
.vscode/settings.json
vendored
Normal file
26
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"json.schemas": [
|
||||||
|
{
|
||||||
|
"fileMatch": ["/npmextra.json"],
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"npmci": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for npmci"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for gitzone",
|
||||||
|
"properties": {
|
||||||
|
"projectType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2016 Push.Rocks
|
Copyright (c) 2016 Lossless GmbH
|
||||||
|
|
||||||
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
|
||||||
|
16
README.md
16
README.md
@ -1,16 +0,0 @@
|
|||||||
# early
|
|
||||||
minimal and fast loading animation for modules that need a little starting time.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
// Put the following at the start of your module
|
|
||||||
import * as early from "early";
|
|
||||||
early.start("myModuleName");
|
|
||||||
/*
|
|
||||||
do your loading stuff
|
|
||||||
*/
|
|
||||||
early.stop(); // stop "early" when your module is ready
|
|
||||||
```
|
|
||||||
|
|
||||||
early runs in its own process: The loader animation runs smoothly even when your event queue of your currently loading moudle is working heavily.
|
|
0
dist/early.child.d.ts
vendored
0
dist/early.child.d.ts
vendored
53
dist/early.child.js
vendored
53
dist/early.child.js
vendored
@ -1,53 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
/// <reference path="./typings/index.d.ts" />
|
|
||||||
var colors = require("colors");
|
|
||||||
var readline = require("readline");
|
|
||||||
var rl;
|
|
||||||
var initReadline = function () {
|
|
||||||
rl = readline.createInterface({
|
|
||||||
input: process.stdin,
|
|
||||||
output: process.stdout
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var moduleName;
|
|
||||||
var loaderLength;
|
|
||||||
var frameCounter = 0;
|
|
||||||
var makeFrame = function () {
|
|
||||||
var resultString = "["
|
|
||||||
+ "/".green.repeat(frameCounter)
|
|
||||||
+ " ".repeat(loaderLength - frameCounter)
|
|
||||||
+ "]"
|
|
||||||
+ " starting "
|
|
||||||
+ moduleName.cyan;
|
|
||||||
if (frameCounter == loaderLength) {
|
|
||||||
frameCounter = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
frameCounter++;
|
|
||||||
}
|
|
||||||
return resultString;
|
|
||||||
};
|
|
||||||
var logEarly = function () {
|
|
||||||
rl.write(null, { ctrl: true, name: 'u' });
|
|
||||||
rl.write(makeFrame());
|
|
||||||
setTimeout(function () {
|
|
||||||
logEarly();
|
|
||||||
}, 80);
|
|
||||||
};
|
|
||||||
var start = function (moduleNameArg, loaderLengthArg) {
|
|
||||||
if (moduleNameArg === void 0) { moduleNameArg = ""; }
|
|
||||||
if (loaderLengthArg === void 0) { loaderLengthArg = "10"; }
|
|
||||||
moduleName = moduleNameArg;
|
|
||||||
loaderLength = parseInt(loaderLengthArg);
|
|
||||||
if (process.env.CI == "undefined") {
|
|
||||||
initReadline();
|
|
||||||
logEarly();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log("**** starting " + moduleName.cyan + " ****");
|
|
||||||
}
|
|
||||||
;
|
|
||||||
};
|
|
||||||
start(process.env.moduleNameArg, process.env.loaderLengthArg);
|
|
||||||
|
|
||||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVhcmx5LmNoaWxkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw2Q0FBNkM7QUFDN0MsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQy9CLElBQU8sUUFBUSxXQUFXLFVBQVUsQ0FBQyxDQUFDO0FBQ3RDLElBQUksRUFBRSxDQUFDO0FBQ1AsSUFBSSxZQUFZLEdBQUc7SUFDZixFQUFFLEdBQUcsUUFBUSxDQUFDLGVBQWUsQ0FBQztRQUM5QixLQUFLLE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5ndGggPSBwYXJzZUludChsb2FkZXJMZW5ndGhBcmcpO1xyXG4gICAgaWYgKHByb2Nlc3MuZW52LkNJID09IFwidW5kZWZpbmVkXCIpe1xyXG4gICAgICAgIGluaXRSZWFkbGluZSgpO1xyXG4gICAgICAgIGxvZ0Vhcmx5KCk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAgIGNvbnNvbGUubG9nKFwiKioqKiBzdGFydGluZyBcIiArIG1vZHVsZU5hbWUuY3lhbiArIFwiICoqKipcIik7XHJcbiAgICB9O1xyXG59O1xyXG5cclxuc3RhcnQocHJvY2Vzcy5lbnYubW9kdWxlTmFtZUFyZyxwcm9jZXNzLmVudi5sb2FkZXJMZW5ndGhBcmcpOyJdfQ==
|
|
2
dist/index.d.ts
vendored
2
dist/index.d.ts
vendored
@ -1,2 +0,0 @@
|
|||||||
export declare let start: (moduleNameArg?: string, loaderLengthArg?: string) => void;
|
|
||||||
export declare let stop: () => void;
|
|
21
dist/index.js
vendored
21
dist/index.js
vendored
@ -1,21 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var path = require("path");
|
|
||||||
var childProcess = require("child_process");
|
|
||||||
var earlyChild;
|
|
||||||
// exports
|
|
||||||
exports.start = function (moduleNameArg, loaderLengthArg) {
|
|
||||||
if (moduleNameArg === void 0) { moduleNameArg = ""; }
|
|
||||||
if (loaderLengthArg === void 0) { loaderLengthArg = "10"; }
|
|
||||||
earlyChild = childProcess.fork(path.join(__dirname, "early.child.js"), [], {
|
|
||||||
env: {
|
|
||||||
moduleNameArg: moduleNameArg,
|
|
||||||
loaderLengthArg: loaderLengthArg,
|
|
||||||
CI: process.env.CI
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
exports.stop = function () {
|
|
||||||
earlyChild.kill();
|
|
||||||
};
|
|
||||||
|
|
||||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVz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9IFwiXCIsbG9hZGVyTGVuZ3RoQXJnOnN0cmluZyA9IFwiMTBcIil7XHJcbiAgICBlYXJseUNoaWxkID0gY2hpbGRQcm9jZXNzLmZvcmsocGF0aC5qb2luKF9fZGlybmFtZSxcImVhcmx5LmNoaWxkLmpzXCIpLFtdLHtcclxuICAgICAgICBlbnY6IHtcclxuICAgICAgICAgICAgbW9kdWxlTmFtZUFyZzptb2R1bGVOYW1lQXJnLFxyXG4gICAgICAgICAgICBsb2FkZXJMZW5ndGhBcmc6bG9hZGVyTGVuZ3RoQXJnLFxyXG4gICAgICAgICAgICBDSTogcHJvY2Vzcy5lbnYuQ0lcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxufTtcclxuXHJcbmV4cG9ydCBsZXQgc3RvcCA9IGZ1bmN0aW9uKCl7XHJcbiAgICBlYXJseUNoaWxkLmtpbGwoKTtcclxufTtcclxuXHJcbiJdfQ==
|
|
19
npmextra.json
Normal file
19
npmextra.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"npmci": {
|
||||||
|
"npmGlobalTools": [
|
||||||
|
"@gitzone/npmts"
|
||||||
|
],
|
||||||
|
"npmAccessLevel": "public"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"projectType": "npm",
|
||||||
|
"module": {
|
||||||
|
"githost": "gitlab.com",
|
||||||
|
"gitscope": "pushrocks",
|
||||||
|
"gitrepo": "early",
|
||||||
|
"shortDescription": "minimal and fast loading plugin for startup time measuring",
|
||||||
|
"npmPackagename": "@pushrocks/early",
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"mode":"default",
|
|
||||||
"coverageTreshold":30
|
|
||||||
}
|
|
1209
package-lock.json
generated
Normal file
1209
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
47
package.json
47
package.json
@ -1,15 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "early",
|
"name": "@pushrocks/early",
|
||||||
"version": "2.0.0",
|
"version": "3.0.6",
|
||||||
"description": "nice module loading animation for modules that need a little starting time.",
|
"private": false,
|
||||||
"main": "dist/index.js",
|
"description": "minimal and fast loading plugin for startup time measuring",
|
||||||
"typings": "dist/index.d.ts",
|
"main": "dist_ts/index.js",
|
||||||
|
"typings": "dist_ts/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(npmts)"
|
"test": "(tsrun test/test.ts)",
|
||||||
|
"build": "(tsbuild --web)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/pushrocks/early.git"
|
"url": "git+https://gitlab.com/pushrocks/early.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"preloader"
|
"preloader"
|
||||||
@ -17,13 +19,34 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/pushrocks/early/issues"
|
"url": "https://gitlab.com/pushrocks/early/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/pushrocks/early#readme",
|
"homepage": "https://gitlab.com/pushrocks/early#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"npmts": "^5.1.9"
|
"@gitzone/tsrun": "^1.2.12",
|
||||||
|
"@pushrocks/smartdelay": "^2.0.10",
|
||||||
|
"@pushrocks/tapbundle": "^3.2.9",
|
||||||
|
"tslint": "^6.1.3",
|
||||||
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"colors": "^1.1.2"
|
"@gitzone/tsbuild": "^2.1.24",
|
||||||
}
|
"@pushrocks/consolecolor": "^2.0.1",
|
||||||
|
"@pushrocks/smartpromise": "^3.0.6"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"ts/**/*",
|
||||||
|
"ts_web/**/*",
|
||||||
|
"dist/**/*",
|
||||||
|
"dist_*/**/*",
|
||||||
|
"dist_ts/**/*",
|
||||||
|
"dist_ts_web/**/*",
|
||||||
|
"assets/**/*",
|
||||||
|
"cli.js",
|
||||||
|
"npmextra.json",
|
||||||
|
"readme.md"
|
||||||
|
],
|
||||||
|
"browserslist": [
|
||||||
|
"last 1 chrome versions"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
51
readme.md
Normal file
51
readme.md
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# @pushrocks/early
|
||||||
|
minimal and fast loading plugin for startup time measuring
|
||||||
|
|
||||||
|
## Availabililty and Links
|
||||||
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/early)
|
||||||
|
* [gitlab.com (source)](https://gitlab.com/pushrocks/early)
|
||||||
|
* [github.com (source mirror)](https://github.com/pushrocks/early)
|
||||||
|
* [docs (typedoc)](https://pushrocks.gitlab.io/early/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
|
||||||
|
Status Category | Status Badge
|
||||||
|
-- | --
|
||||||
|
GitLab Pipelines | [](https://lossless.cloud)
|
||||||
|
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||||
|
npm | [](https://lossless.cloud)
|
||||||
|
Snyk | [](https://lossless.cloud)
|
||||||
|
TypeScript Support | [](https://lossless.cloud)
|
||||||
|
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
Code Style | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||||
|
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||||
|
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// Put the following at the start of your module
|
||||||
|
import * as early from 'early';
|
||||||
|
early.start('myModuleName');
|
||||||
|
/*
|
||||||
|
do your loading stuff
|
||||||
|
*/
|
||||||
|
early.stop().then((loadingTime: number) => {
|
||||||
|
// loadingTime in milliseconds
|
||||||
|
}); // stop "early" when your module is ready
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contribution
|
||||||
|
|
||||||
|
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
[](https://maintainedby.lossless.com)
|
0
test/test.d.ts
vendored
0
test/test.d.ts
vendored
15
test/test.js
15
test/test.js
@ -1,15 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
/// <reference path="../ts/typings/index.d.ts" />
|
|
||||||
var early = require("../dist/index.js");
|
|
||||||
describe("early", function () {
|
|
||||||
it(".start()", function (done) {
|
|
||||||
this.timeout(10000);
|
|
||||||
early.start("early");
|
|
||||||
setTimeout(done, 5000);
|
|
||||||
});
|
|
||||||
it(".stop()", function () {
|
|
||||||
early.stop();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLGlEQUFpRDtBQUNqRCxJQUFPLEtBQUssV0FBVyxrQkFBa0IsQ0FBQyxDQUFDO0FBRTNDLFFBQVEsQ0FBQyxPQUFPLEVBQUM7SUFDYixFQUFFLENBQUMsVUFBVSxFQUFDLFVBQVMsSUFBSTtRQUN2QixJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ3BCLEtBQUssQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDckIsVUFBVSxDQUFDLElBQUksRUFBQyxJQUFJLENBQUMsQ0FBQztJQUMxQixDQUFDLENBQUMsQ0FBQztJQUNILEVBQUUsQ0FBQyxTQUFTLEVBQUM7UUFDVCxLQUFLLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDakIsQ0FBQyxDQUFDLENBQUE7QUFDTixDQUFDLENBQUMsQ0FBQSIsImZpbGUiOiJ0ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL3RzL3R5cGluZ3MvaW5kZXguZC50c1wiIC8+XHJcbmltcG9ydCBlYXJseSA9IHJlcXVpcmUoXCIuLi9kaXN0L2luZGV4LmpzXCIpO1xyXG5cclxuZGVzY3JpYmUoXCJlYXJseVwiLGZ1bmN0aW9uKCl7XHJcbiAgICBpdChcIi5zdGFydCgpXCIsZnVuY3Rpb24oZG9uZSl7XHJcbiAgICAgICAgdGhpcy50aW1lb3V0KDEwMDAwKTtcclxuICAgICAgICBlYXJseS5zdGFydChcImVhcmx5XCIpO1xyXG4gICAgICAgIHNldFRpbWVvdXQoZG9uZSw1MDAwKTtcclxuICAgIH0pO1xyXG4gICAgaXQoXCIuc3RvcCgpXCIsZnVuY3Rpb24oKXtcclxuICAgICAgICBlYXJseS5zdG9wKCk7XHJcbiAgICB9KVxyXG59KSJdfQ==
|
|
34
test/test.ts
34
test/test.ts
@ -1,13 +1,23 @@
|
|||||||
/// <reference path="../ts/typings/index.d.ts" />
|
import { expect, tap } from '@pushrocks/tapbundle';
|
||||||
import early = require("../dist/index.js");
|
import * as smartdelay from '@pushrocks/smartdelay';
|
||||||
|
import early = require('../ts/index');
|
||||||
|
|
||||||
describe("early",function(){
|
tap.test('.start()', async () => {
|
||||||
it(".start()",function(done){
|
early.start('early');
|
||||||
this.timeout(10000);
|
await smartdelay.delayFor(2000);
|
||||||
early.start("early");
|
});
|
||||||
setTimeout(done,5000);
|
|
||||||
});
|
tap.test('.stop()', async () => {
|
||||||
it(".stop()",function(){
|
await early.stop();
|
||||||
early.stop();
|
});
|
||||||
})
|
|
||||||
})
|
tap.test('hrTime Measurement', async () => {
|
||||||
|
let earlyHr = new early.HrtMeasurement();
|
||||||
|
earlyHr.start();
|
||||||
|
await smartdelay.delayFor(1000);
|
||||||
|
let measuredTime = earlyHr.stop();
|
||||||
|
console.log(measuredTime);
|
||||||
|
return expect(measuredTime.milliSeconds).to.be.greaterThan(999);
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.start();
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
|
||||||
let colors = require("colors");
|
|
||||||
import readline = require("readline");
|
|
||||||
let rl;
|
|
||||||
let initReadline = () => {
|
|
||||||
rl = readline.createInterface({
|
|
||||||
input: process.stdin,
|
|
||||||
output: process.stdout
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
let moduleName:string;
|
|
||||||
let loaderLength:number;
|
|
||||||
let frameCounter:number = 0;
|
|
||||||
|
|
||||||
let makeFrame = ():string => {
|
|
||||||
let resultString:string = "["
|
|
||||||
+ "/".green.repeat(frameCounter)
|
|
||||||
+ " ".repeat(loaderLength - frameCounter)
|
|
||||||
+ "]"
|
|
||||||
+ " starting "
|
|
||||||
+ moduleName.cyan;
|
|
||||||
|
|
||||||
if(frameCounter == loaderLength){
|
|
||||||
frameCounter = 0;
|
|
||||||
} else {
|
|
||||||
frameCounter++;
|
|
||||||
}
|
|
||||||
return resultString;
|
|
||||||
};
|
|
||||||
|
|
||||||
let logEarly = () => {
|
|
||||||
rl.write(null, {ctrl: true, name: 'u'});
|
|
||||||
rl.write(makeFrame());
|
|
||||||
setTimeout(function(){
|
|
||||||
logEarly();
|
|
||||||
},80);
|
|
||||||
};
|
|
||||||
|
|
||||||
let start = function(moduleNameArg:string = "",loaderLengthArg:string = "10"){
|
|
||||||
moduleName = moduleNameArg;
|
|
||||||
loaderLength = parseInt(loaderLengthArg);
|
|
||||||
if (process.env.CI == "undefined"){
|
|
||||||
initReadline();
|
|
||||||
logEarly();
|
|
||||||
} else {
|
|
||||||
console.log("**** starting " + moduleName.cyan + " ****");
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
start(process.env.moduleNameArg,process.env.loaderLengthArg);
|
|
45
ts/early.hrtMeasurement.ts
Normal file
45
ts/early.hrtMeasurement.ts
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import * as process from 'process';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* easy high resolution time measurement
|
||||||
|
*/
|
||||||
|
export class HrtMeasurement {
|
||||||
|
nanoSeconds: number = null;
|
||||||
|
milliSeconds: number = null;
|
||||||
|
private _hrTimeStart = null;
|
||||||
|
private _hrTimeStopDiff = null;
|
||||||
|
private _started: boolean = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* start the measurement
|
||||||
|
*/
|
||||||
|
start() {
|
||||||
|
this._started = true;
|
||||||
|
this._hrTimeStart = process.hrtime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* stop the measurement
|
||||||
|
*/
|
||||||
|
stop() {
|
||||||
|
if (this._started === false) {
|
||||||
|
console.log("Hasn't started yet");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this._hrTimeStopDiff = process.hrtime(this._hrTimeStart);
|
||||||
|
this.nanoSeconds = this._hrTimeStopDiff[0] * 1e9 + this._hrTimeStopDiff[1];
|
||||||
|
this.milliSeconds = this.nanoSeconds / 1000000;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* reset the measurement
|
||||||
|
*/
|
||||||
|
reset() {
|
||||||
|
this.nanoSeconds = null;
|
||||||
|
this.milliSeconds = null;
|
||||||
|
this._hrTimeStart = null;
|
||||||
|
this._hrTimeStopDiff = null;
|
||||||
|
this._started = false;
|
||||||
|
}
|
||||||
|
}
|
55
ts/index.ts
55
ts/index.ts
@ -1,21 +1,42 @@
|
|||||||
/// <reference path="./typings/index.d.ts" />
|
import * as consolecolor from '@pushrocks/consolecolor';
|
||||||
import colors = require("colors");
|
import * as smartpromise from '@pushrocks/smartpromise';
|
||||||
import path = require("path");
|
import { HrtMeasurement } from './early.hrtMeasurement';
|
||||||
|
|
||||||
import childProcess = require("child_process");
|
export { HrtMeasurement };
|
||||||
let earlyChild;
|
|
||||||
// exports
|
let doText: boolean = false;
|
||||||
export let start = function(moduleNameArg:string = "",loaderLengthArg:string = "10"){
|
let moduleName: string = 'undefined module name';
|
||||||
earlyChild = childProcess.fork(path.join(__dirname,"early.child.js"),[],{
|
let startHrt: HrtMeasurement;
|
||||||
env: {
|
|
||||||
moduleNameArg:moduleNameArg,
|
if (process.argv.indexOf('-v') === -1) {
|
||||||
loaderLengthArg:loaderLengthArg,
|
doText = true;
|
||||||
CI: process.env.CI
|
}
|
||||||
}
|
|
||||||
});
|
/**
|
||||||
|
* start the loading
|
||||||
|
*/
|
||||||
|
export let start = function (moduleNameArg: string = '', loaderLengthArg: string = '10') {
|
||||||
|
moduleName = moduleNameArg;
|
||||||
|
startHrt = new HrtMeasurement();
|
||||||
|
startHrt.start();
|
||||||
|
if (doText && process.env.CLI_CALL_MODULENAME === moduleName) {
|
||||||
|
console.log(`**** starting ${consolecolor.coloredString(moduleNameArg, 'green')} ****`);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export let stop = function(){
|
export let stop = (): Promise<number> => {
|
||||||
earlyChild.kill();
|
let done = smartpromise.defer<number>();
|
||||||
};
|
let earlyExecutionTime = startHrt.stop().milliSeconds;
|
||||||
|
let earlyExecutionTimeString: string = (earlyExecutionTime / 1000).toString();
|
||||||
|
if (doText && process.env.CLI_CALL_MODULENAME === moduleName) {
|
||||||
|
console.log(
|
||||||
|
`OK! -> finished loading within ${consolecolor.coloredString(
|
||||||
|
earlyExecutionTimeString,
|
||||||
|
'blue'
|
||||||
|
)}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
done.resolve(earlyExecutionTime);
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"globalDependencies": {
|
|
||||||
"colors": "registry:dt/colors#0.6.0-1+20160501135139",
|
|
||||||
"node": "registry:dt/node#6.0.0+20160514165920"
|
|
||||||
}
|
|
||||||
}
|
|
17
tslint.json
Normal file
17
tslint.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||||
|
"rules": {
|
||||||
|
"semicolon": [true, "always"],
|
||||||
|
"no-console": false,
|
||||||
|
"ordered-imports": false,
|
||||||
|
"object-literal-sort-keys": false,
|
||||||
|
"member-ordering": {
|
||||||
|
"options":{
|
||||||
|
"order": [
|
||||||
|
"static-method"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultSeverity": "warning"
|
||||||
|
}
|
Reference in New Issue
Block a user