From e32466670d0142587e0c6eaa41ea4f28b9f7a8a4 Mon Sep 17 00:00:00 2001 From: ykob Date: Fri, 22 Apr 2022 22:12:51 +0900 Subject: [PATCH] init the project. --- .eslintrc.js | 21 +++++++++++++++++++++ .gitignore | 2 ++ .prettierignore | 4 ++++ .prettierrc.json | 5 +++++ LICENSE | 21 +++++++++++++++++++++ README.md | 17 +++++++++++++++++ package.json | 46 ++++++++++++++++++++++++++++++++++++++++++++++ src/index.ts | 0 tsconfig.json | 14 ++++++++++++++ 9 files changed, 130 insertions(+) create mode 100644 .eslintrc.js create mode 100644 .gitignore create mode 100644 .prettierignore create mode 100644 .prettierrc.json create mode 100644 LICENSE create mode 100644 README.md create mode 100644 package.json create mode 100644 src/index.ts create mode 100644 tsconfig.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..7008945 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,21 @@ +module.exports = { + env: { + browser: true, + node: true, + }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'prettier', + ], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + }, + plugins: ['@typescript-eslint'], + rules: { + 'no-console': 'error', + 'no-debugger': 'error', + }, +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db4c6d9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist +node_modules \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..7d427b1 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +dist +node_modules +package-lock.json +yarn.lock diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..36301bc --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,5 @@ +{ + "semi": false, + "singleQuote": true, + "trailingComma": "es5" +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..358da1c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Yoichi Kobayashi + +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..5d9fb84 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# js-creative-util + +Private JavaScript utility functions for Creative Coding created by @ykob + +## Install + +### npm + +``` +npm i @ykob/js-creative-util +``` + +### yarn + +``` +yarn add @ykob/js-creative-util +``` \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..5329986 --- /dev/null +++ b/package.json @@ -0,0 +1,46 @@ +{ + "name": "@ykob/js-creative-util", + "version": "1.0.0", + "description": "Private JavaScript utility functions for Creative Coding created by @ykob", + "author": { + "name": "Yoichi Kobayashi", + "email": "info@tplh.net", + "url": "https://www.tplh.net/" + }, + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/ykob/js-util.git" + }, + "private": false, + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist/", + "LICENSE" + ], + "scripts": { + "prebuild": "rimraf dist", + "build": "tsc -p .", + "lint:eslint": "eslint --ext \".js,.ts\" --ignore-path .gitignore . --fix", + "lint:prettier": "prettier --write src/**/*", + "lint": "npm run lint:prettier && npm run lint:eslint", + "prepare": "npm run build" + }, + "devDependencies": { + "@types/jest": "^27.4.1", + "@typescript-eslint/eslint-plugin": "^5.13.0", + "@typescript-eslint/parser": "^5.13.0", + "eslint": "^8.10.0", + "eslint-config-prettier": "^8.5.0", + "prettier": "2.5.1", + "typescript": "^4.6.2" + }, + "keywords": [ + "JavaScript", + "TypeScript" + ] +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..27cda6f --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "declaration": true, + "esModuleInterop": true, + "module": "ES6", + "moduleResolution": "node", + "outDir": "./dist", + "sourceMap": true, + "strict": true, + "target": "ES6" + }, + "exclude": ["dist", "node_modules", "**/*.spec.ts"], + "include": ["src/**/*"] +}