Skip to content

Commit

Permalink
chore: configure repo
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Jul 18, 2024
1 parent 8933199 commit 4cb3ef3
Show file tree
Hide file tree
Showing 6 changed files with 718 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
dist
docs
package-lock.json
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export * as r1 from './r1/_index'
export * as r2 from './r2/_index'
export * as s2 from './s2/_index'
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
{
"name": "s2",
"name": "s2js",
"version": "1.0.0",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"module": "dist/s2.esm.js",
"scripts": {
"test": "node --import tsx --test **/*_test.ts"
"build": "tsdx build --entry index.ts",
"test": "node --import tsx --test **/*_test.ts",
"docs": "typedoc"
},
"author": "Peter Johnson",
"license": "MIT",
"license": "AGPL",
"description": "javascript port of s2 geometry",
"devDependencies": {
"@types/node": "^20.14.11",
"tsx": "^4.16.2"
"tsdx": "^0.14.1",
"tsx": "^4.16.2",
"typedoc": "^0.26.4",
"typedoc-plugin-markdown": "^4.2.1"
}
}
33 changes: 33 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"exclude": ["**/*_test.ts"],
"compilerOptions": {
"module": "esnext",
"lib": ["dom", "esnext"],
"target": "esnext",
"importHelpers": true,
// output .d.ts declaration files for consumers
"declaration": true,
// output .js.map sourcemap files for consumers
"sourceMap": true,
// match output dir to input dir. e.g. dist/index instead of dist/src/index
"rootDir": ".",
// stricter type-checking for stronger correctness. Recommended by TS
"strict": true,
// linter checks for common issues
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
// noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative
"noUnusedLocals": true,
"noUnusedParameters": true,
// use Node's module resolution algorithm, instead of the legacy TS one
"moduleResolution": "node",
// interop between ESM and CJS modules. Recommended by TS
"esModuleInterop": true,
// significant perf increase by skipping checking .d.ts files, particularly those in node_modules. Recommended by TS
"skipLibCheck": true,
// error out if import and file system have a casing mismatch. Recommended by TS
"forceConsistentCasingInFileNames": true,
// `tsdx build` ignores this option, but it is commonly used when type-checking separately with `tsc`
"noEmit": true
}
}
10 changes: 10 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"out": "docs",
"cleanOutputDir": true,
"excludeExternals": true,
"theme": "default",
"readme": "none",
"hideGenerator": true,
"plugin": ["typedoc-plugin-markdown"],
"entryPoints": ["index.ts"]
}

0 comments on commit 4cb3ef3

Please sign in to comment.