From 5877c576a522bb85c634c3b2be011d71394d8b0c Mon Sep 17 00:00:00 2001 From: Pavol Hejny Date: Thu, 4 Jul 2019 16:16:08 +0200 Subject: [PATCH] Awesome initial state --- .gitignore | 13 +++++++++ .prettierrc | 7 +++++ .vscode/terminals.json | 17 ++++++++++++ LICENSE | 21 +++++++++++++++ README.md | 39 +++++++++++++++++++++++++++ jestconfig.json | 9 +++++++ package.json | 42 +++++++++++++++++++++++++++++ src/classes/Awesome.ts | 4 +++ src/index.ts | 6 +++++ src/interfaces/IAwesomeInterface.ts | 3 +++ src/utils/object.ts | 3 +++ test/index.test.ts | 9 +++++++ tsconfig.json | 17 ++++++++++++ tslint.json | 3 +++ 14 files changed, 193 insertions(+) create mode 100644 .gitignore create mode 100644 .prettierrc create mode 100644 .vscode/terminals.json create mode 100644 LICENSE create mode 100644 README.md create mode 100644 jestconfig.json create mode 100644 package.json create mode 100644 src/classes/Awesome.ts create mode 100644 src/index.ts create mode 100644 src/interfaces/IAwesomeInterface.ts create mode 100644 src/utils/object.ts create mode 100644 test/index.test.ts create mode 100644 tsconfig.json create mode 100644 tslint.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2194255 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +/lib +/coverage + +# IDEs +.idea +.vscode/* +!.vscode/terminals.json + +node_modules + + +.~lock* + diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..c7340e0 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "tabWidth": 4, + "singleQuote": true, + "trailingComma": "all", + "arrowParens": "always", + "printWidth": 120 +} \ No newline at end of file diff --git a/.vscode/terminals.json b/.vscode/terminals.json new file mode 100644 index 0000000..e2dceff --- /dev/null +++ b/.vscode/terminals.json @@ -0,0 +1,17 @@ +{ + "autokill": true, + "terminals": [ + { + "name": "build-watch", + "command": "npm run build-watch" + }, + { + "name": "prettier-watch", + "command": "npm run prettier-watch" + }, + { + "name": "test-watch", + "command": "npm run test-watch" + } + ] +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..77e46f2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 [Pavol Hejný](https://www.pavolhejny.com/) and [David Pohan](https://davidpohan.cz/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..01bab7f --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# Awesome library + +A very simple tool library for awesome thing. + +# Install + +Install from [NPM](https://www.npmjs.com/package/configchecker) + +```bash +npm i waitsecond +``` + +# Usage + + + +```typescript +import { } from 'awesome'; + +// TODO: +``` + + +# Contributing + +I am opened to your pull requests, feedback, suggestions and donations :) . Contact to me are on my [personal page](https://www.pavolhejny.com) + + + + +# Authors + +- [Pavol Hejný](https://github.com/hejny) +- [David Pohan](https://github.com/pohy) + + +# Thanks + +To boilerplate was used [my-awesome-greeter](https://github.com/caki0915/my-awesome-greeter). diff --git a/jestconfig.json b/jestconfig.json new file mode 100644 index 0000000..f71be82 --- /dev/null +++ b/jestconfig.json @@ -0,0 +1,9 @@ +{ + "transform": { + "^.+\\.(t|j)sx?$": "ts-jest" + }, + "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", + "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"], + "coverageDirectory": "./coverage/", + "collectCoverage": true + } \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..cd130c9 --- /dev/null +++ b/package.json @@ -0,0 +1,42 @@ +{ + "name": "configchecker", + "version": "0.4.1", + "description": "Awesome checker of config - fully support typescript, fluent API,...", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "start": "npm run build-watch", + "build": "tsc", + "build-watch": "tsc --watch", + "prettier": "prettier --config .prettierrc --write \"{src,test,.vscode}/**/*.{ts,json}\"", + "prettier-watch": "onchange --initial \"**/*\" -- npm run prettier", + "test": "jest --config jestconfig.json", + "test-watch": "jest --config jestconfig.json --watchAll", + "lint": "tslint -p tsconfig.json", + "prepublish": "npm test && npm run lint && npm run build", + "preversion": "npm run lint", + "postversion": "git push && git push --tags" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com:hejny/configchecker.git" + }, + "author": "Pavol Hejný", + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "@types/jest": "^24.0.13", + "codecov": "^3.5.0", + "jest": "^24.8.0", + "onchange": "^3.3.0", + "prettier": "github:prettier/prettier", + "ts-jest": "^24.0.2", + "tslint": "^5.17.0", + "tslint-config-prettier": "^1.18.0", + "typedoc": "^0.14.2", + "typescript": "^3.5.1" + }, + "files": [ + "lib/**/*" + ] +} diff --git a/src/classes/Awesome.ts b/src/classes/Awesome.ts new file mode 100644 index 0000000..e8b95f1 --- /dev/null +++ b/src/classes/Awesome.ts @@ -0,0 +1,4 @@ +export class Awesome { + someMethod(){ + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..cef9475 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,6 @@ +import { ConfigChecker } from './classes/Awesome'; +import { IConfigSource } from './interfaces/IAwesomeInterface'; +import { IConfigValueProfile } from './interfaces/IConfigValueProfile'; +import * as ObjectUtils from './utils/object'; + +export { ConfigChecker, IConfigSource, IConfigValueProfile, ObjectUtils }; diff --git a/src/interfaces/IAwesomeInterface.ts b/src/interfaces/IAwesomeInterface.ts new file mode 100644 index 0000000..69d14c9 --- /dev/null +++ b/src/interfaces/IAwesomeInterface.ts @@ -0,0 +1,3 @@ +export interface IAwesomeInterface { + awesomeKey: string; +} diff --git a/src/utils/object.ts b/src/utils/object.ts new file mode 100644 index 0000000..c4d123a --- /dev/null +++ b/src/utils/object.ts @@ -0,0 +1,3 @@ + +export function awesome(){ +} diff --git a/test/index.test.ts b/test/index.test.ts new file mode 100644 index 0000000..8bbff7b --- /dev/null +++ b/test/index.test.ts @@ -0,0 +1,9 @@ +import { Awesome } from '../src/classes/Awesome'; + +test('Awesome', () => { + + const awesome = new Awesome(); + + expect(() => awesome.someMethod().not.toThrowError(); + +}); \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..becedd6 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "declaration": true, + "outDir": "./lib", + "alwaysStrict": true, + "forceConsistentCasingInFileNames": true, + "lib": ["dom", "es2017"], + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true + }, + "include": ["src"], + "exclude": ["node_modules", "test"] +} \ No newline at end of file diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..d6a39ec --- /dev/null +++ b/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["tslint:recommended", "tslint-config-prettier"] + } \ No newline at end of file