Skip to content

Commit

Permalink
Set up boilerplate package using pnpm, eslint and typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed Sep 6, 2024
1 parent 2c10718 commit fa9c6a8
Show file tree
Hide file tree
Showing 8 changed files with 1,124 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
/dist

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vscode

# release configuration (used for token)
.npmrc
12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";

/** @type {import('eslint').Linter.Config} */
export default [
{ ignores: ["dist/"] },
{ files: ["**/*.{ts,tsx}"] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
1 change: 1 addition & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const add = (a: number, b: number) => a + b;
57 changes: 57 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "three-panorama-controls",
"version": "1.0.0",
"description": "Panorama controls for three.js.",
"author": "Fawad Ali <[email protected]>",
"license": "Apache-2.0",
"homepage": "https://github.com/9inpachi/three-panorama-controls#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/9inpachi/three-panorama-controls.git"
},
"keywords": [
"three.js",
"three",
"panorama",
"controls",
"react",
"fiber"
],
"files": [
"dist"
],
"bugs": {
"url": "https://github.com/9inpachi/three-panorama-controls/issues"
},
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
}
},
"scripts": {
"clean": "rm -rf ./dist",
"tsc": "tsc",
"lint": "eslint .",
"prepublishOnly": "pnpm build",
"dev": "pnpm clean && tsc --watch",
"build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types",
"build:cjs": "pnpm tsc --project ./tsconfig.cjs.json --outDir ./dist/cjs/ --declaration false",
"build:esm": "pnpm tsc --project ./tsconfig.esm.json --outDir ./dist/esm/ --declaration false",
"build:types": "pnpm tsc --emitDeclarationOnly true --declarationDir ./dist/types"
},
"peerDependencies": {
"three": ">= 0.160"
},
"devDependencies": {
"@eslint/js": "^9.10.0",
"eslint": "^9.10.0",
"globals": "^15.9.0",
"typescript": "^5.5.4",
"typescript-eslint": "^8.4.0"
}
}
Loading

0 comments on commit fa9c6a8

Please sign in to comment.