Skip to content

Commit

Permalink
Workflows + LF
Browse files Browse the repository at this point in the history
  • Loading branch information
hejny committed Dec 26, 2020
1 parent 9dfffd0 commit dfe93f5
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 59 deletions.
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
indent: ['error', 4],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'no-constant-condition': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-explicit-any': 0,
},
};
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"endOfLine": "lf",
"tabWidth": 4,
"singleQuote": true,
"trailingComma": "all",
Expand Down
6 changes: 4 additions & 2 deletions .vscode/terminals.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
},
{
"name": "prettier-watch",
"command": "npm run prettier-watch"
"command": "npm run prettier-watch",
"onlySingle": true
},
{
"name": "test-watch",
"command": "npm run test-watch"
"command": "npm run test-watch",
"onlySingle": true
},
{
"name": "generate-main-exports",
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,28 @@ npm i waitasecond

# Usage



```typescript
import { } from 'waitasecond';
import {} from 'waitasecond';

// TODO:
```


# Contributing

I am opened to your pull requests, feedback, suggestions and donations :) . Contact to me is on my [personal page](https://www.pavolhejny.com)

Please install theese plugins:

- [Terminals Manager](https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-terminals)
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- [ESlint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)

## Publishing a new version

Just do

```bash
npm version patch
```
on *minor* or *major*. Scripts defined in package.json will test, lint, build, create documentation and push the whole project for you.

on _minor_ or _major_. Scripts defined in package.json will test, lint, build, create documentation and push the whole project for you.
104 changes: 52 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
{
"name": "waitasecond",
"version": "1.5.0",
"description": "Simple tool library for the waiting using Promises.",
"main": "dist/main.js",
"typings": "dist/main.d.ts",
"sideEffects": false,
"files": [
"dist/**"
],
"directions": {
"functions": "dist/functions"
},
"scripts": {
"start": "npm run build-watch",
"build": "tsc",
"build-watch": "tsc --watch",
"prettier": "prettier --config .prettierrc --write \"{src,test,.vscode}/**/*.{ts,json}\"",
"pretty-imports": "npx organize-imports-cli tsconfig.json",
"prettier-watch": "onchange \"{src,test,.vscode}/**/*.{ts,json}\" -- prettier --config .prettierrc --write {{changed}}",
"prettier-commit": "git diff --exit-code && npm run pretty-imports && npm run prettier && git add src && git commit --allow-empty -m \"Prettier\"",
"documentation": "typedoc --excludePrivate --hideGenerator --mode file --theme minimal --out docs --name \"Wait second\" ./src",
"documentation-commit": "git diff --exit-code && npm run documentation && git add docs && git commit --allow-empty -m \"Documentation\"",
"test": "jest --config jestconfig.json",
"test-watch": "jest --config jestconfig.json --watchAll",
"lint": "tslint -p tsconfig.json",
"generate-main-exports": "ts-node ./scripts/generate-main-exports/generate-main-exports.ts",
"generate-main-exports-commit": "git diff --exit-code && npm run generate-main-exports && npm run prettier && git add src && git commit --allow-empty -m \"Updating exports\"",
"preversion": "npm test && npm run lint && npm run generate-main-exports-commit && npm run build && npm run prettier-commit && npm run documentation-commit",
"postversion": "git push && git push --tags && npm publish"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com:hejny/waitasecond.git"
},
"author": "Pavol Hejný",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@types/jest": "^24.0.13",
"codecov": "^3.5.0",
"glob-promise": "^3.4.0",
"jest": "^24.8.0",
"onchange": "^3.3.0",
"organize-imports-cli": "^0.8.0",
"prettier": "github:prettier/prettier",
"ts-jest": "^24.0.2",
"ts-node": "^9.0.0",
"tslint": "^5.17.0",
"tslint-config-prettier": "^1.18.0",
"typedoc": "^0.14.2",
"typescript": "^3.5.1"
}
"name": "waitasecond",
"version": "1.5.0",
"description": "Simple tool library for the waiting using Promises.",
"main": "dist/main.js",
"typings": "dist/main.d.ts",
"sideEffects": false,
"files": [
"dist/**"
],
"directions": {
"functions": "dist/functions"
},
"scripts": {
"start": "npm run build-watch",
"build": "tsc",
"build-watch": "tsc --watch",
"prettier": "prettier --config .prettierrc --write \"{src,test,.vscode}/**/*.{ts,json}\"",
"pretty-imports": "npx organize-imports-cli tsconfig.json",
"prettier-watch": "onchange \"{src,test,.vscode}/**/*.{ts,json}\" -- prettier --config .prettierrc --write {{changed}}",
"prettier-commit": "git diff --exit-code && npm run pretty-imports && npm run prettier && git add src && git commit --allow-empty -m \"Prettier\"",
"documentation": "typedoc --excludePrivate --hideGenerator --mode file --theme minimal --out docs --name \"Wait second\" ./src",
"documentation-commit": "git diff --exit-code && npm run documentation && git add docs && git commit --allow-empty -m \"Documentation\"",
"test": "jest --config jestconfig.json",
"test-watch": "jest --config jestconfig.json --watchAll",
"lint": "tslint -p tsconfig.json",
"generate-main-exports": "ts-node ./scripts/generate-main-exports/generate-main-exports.ts",
"generate-main-exports-commit": "git diff --exit-code && npm run generate-main-exports && npm run prettier && git add src && git commit --allow-empty -m \"Updating exports\"",
"preversion": "npm test && npm run lint && npm run generate-main-exports-commit && npm run build && npm run prettier-commit && npm run documentation-commit",
"postversion": "git push && git push --tags && npm publish"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com:hejny/waitasecond.git"
},
"author": "Pavol Hejný",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@types/jest": "^24.0.13",
"codecov": "^3.5.0",
"glob-promise": "^3.4.0",
"jest": "^24.8.0",
"onchange": "^3.3.0",
"organize-imports-cli": "^0.8.0",
"prettier": "github:prettier/prettier",
"ts-jest": "^24.0.2",
"ts-node": "^9.0.0",
"tslint": "^5.17.0",
"tslint-config-prettier": "^1.18.0",
"typedoc": "^0.14.2",
"typescript": "^3.5.1"
}
}

0 comments on commit dfe93f5

Please sign in to comment.