From 7d79f79b6ad42e8c8c49f40edb22c015c2c78362 Mon Sep 17 00:00:00 2001 From: philkunz Date: Mon, 15 Aug 2016 05:55:09 +0200 Subject: [PATCH] add some structure --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ README.md | 13 +++++++++++++ dist/index.js | 1 + dist/nodehash.plugins.d.ts | 2 ++ dist/nodehash.plugins.js | 4 ++++ npmextra.json | 1 + package.json | 5 ++++- ts/index.ts | 1 + ts/nodehash.plugins.ts | 2 ++ 9 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml create mode 100644 dist/nodehash.plugins.d.ts create mode 100644 dist/nodehash.plugins.js create mode 100644 npmextra.json create mode 100644 ts/nodehash.plugins.ts diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e745cf1 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,36 @@ +image: hosttoday/ht-docker-node:npmts + +stages: +- test +- release + +testLEGACY: + stage: test + script: + - npmci test legacy + tags: + - docker + +testLTS: + stage: test + script: + - npmci test lts + tags: + - docker + +testSTABLE: + stage: test + script: + - npmci test stable + tags: + - docker + +release: + stage: release + environment: npmjs-com_registry + script: + - npmci publish + only: + - tags + tags: + - docker \ No newline at end of file diff --git a/README.md b/README.md index a6b47d6..0d8ea3f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,15 @@ # nodehash simplifies access to node hash functions. TypeScript Ready + +## Status +[![build status](https://gitlab.com/pushrocks/nodehash/badges/master/build.svg)](https://gitlab.com/pushrocks/nodehash/commits/master) + +## Usage +We recommend the use of TypeScript for best in class intellisense. + +```typescript +import * as nodehash from "nodehash"; + +let sha256 = new nodehash.sha256(); +let myHashedString = sha256.fromString(); +``` \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index fad0d19..056a48d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1,2 @@ +"use strict"; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0= \ No newline at end of file diff --git a/dist/nodehash.plugins.d.ts b/dist/nodehash.plugins.d.ts new file mode 100644 index 0000000..8ccaaa0 --- /dev/null +++ b/dist/nodehash.plugins.d.ts @@ -0,0 +1,2 @@ +import "typings-global"; +export import crypto = require("crypto"); diff --git a/dist/nodehash.plugins.js b/dist/nodehash.plugins.js new file mode 100644 index 0000000..8ece177 --- /dev/null +++ b/dist/nodehash.plugins.js @@ -0,0 +1,4 @@ +"use strict"; +require("typings-global"); +exports.crypto = require("crypto"); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZWhhc2gucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25vZGVoYXNoLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUNWLGNBQU0sV0FBVyxRQUFRLENBQUMsQ0FBQyJ9 \ No newline at end of file diff --git a/npmextra.json b/npmextra.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/npmextra.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/package.json b/package.json index c3e429f..0226599 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "simplifies access to node hash functions", "main": "dist/index.js", - "typings":"dist/index.d.ts", + "typings": "dist/index.d.ts", "scripts": { "test": "(npmts)" }, @@ -26,5 +26,8 @@ "npmts-g": "^5.2.8", "should": "^11.1.0", "typings-test": "^1.0.1" + }, + "dependencies": { + "typings-global": "^1.0.6" } } diff --git a/ts/index.ts b/ts/index.ts index e69de29..1fc9213 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -0,0 +1 @@ +import * as plugins from "./nodehash.plugins"; diff --git a/ts/nodehash.plugins.ts b/ts/nodehash.plugins.ts new file mode 100644 index 0000000..9eb4670 --- /dev/null +++ b/ts/nodehash.plugins.ts @@ -0,0 +1,2 @@ +import "typings-global"; +export import crypto = require("crypto"); \ No newline at end of file