Initialize a new project
This commit is contained in:
parent
bb1826aab5
commit
07a33c8ee4
19
.eslintrc.cjs
Normal file
19
.eslintrc.cjs
Normal file
|
@ -0,0 +1,19 @@
|
|||
const { join } = require("node:path");
|
||||
const { PluginName, PresetName } = require("@manuth/eslint-plugin-typescript");
|
||||
|
||||
module.exports = {
|
||||
extends: [
|
||||
`plugin:${PluginName}/${PresetName.RecommendedWithTypeChecking}`
|
||||
],
|
||||
env: {
|
||||
node: true,
|
||||
es6: true
|
||||
},
|
||||
parserOptions: {
|
||||
project: [
|
||||
join(__dirname, "tsconfig.app.json"),
|
||||
join(__dirname, "tsconfig.eslint.json"),
|
||||
join(__dirname, "src", "tests", "tsconfig.json")
|
||||
]
|
||||
}
|
||||
};
|
11
.gitignore
vendored
11
.gitignore
vendored
|
@ -1,4 +1,6 @@
|
|||
# ---> Node
|
||||
# Build results
|
||||
[Ll]ib/
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
@ -94,7 +96,7 @@ dist
|
|||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
|
@ -130,3 +132,8 @@ dist
|
|||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
# Temporary release-assets
|
||||
.tagName.txt
|
||||
.tagHeading.txt
|
||||
.releaseNotes.md
|
||||
.releaseTitle.md
|
||||
|
|
7
.mocharc.jsonc
Normal file
7
.mocharc.jsonc
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"spec": [
|
||||
"./lib/tests/main.test.js"
|
||||
],
|
||||
"ui": "tdd",
|
||||
"colors": true
|
||||
}
|
164
.npmignore
Normal file
164
.npmignore
Normal file
|
@ -0,0 +1,164 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
web_modules/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# vuepress v2.x temp and cache directory
|
||||
.temp
|
||||
.cache
|
||||
|
||||
# Docusaurus cache and generated files
|
||||
.docusaurus
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v2
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
# Source-files
|
||||
[Ss]rc/
|
||||
|
||||
# TypeScript config-files
|
||||
tsconfig.json
|
||||
tsconfig.*.json
|
||||
|
||||
# Lint config-files
|
||||
.eslintrc
|
||||
.eslintrc.*
|
||||
|
||||
# Source-maps
|
||||
[Ll]ib/**/*.map
|
||||
|
||||
# Unit-Tests
|
||||
.mocharc.*
|
||||
[Ll]ib/tests/
|
||||
|
||||
# Visual Studio Code-Environment
|
||||
.vscode/
|
||||
|
||||
# GitHub configuration
|
||||
.github/
|
||||
|
||||
# CI configuration
|
||||
.drone.yml
|
||||
.woodpecker.yml
|
||||
|
||||
# Temporary release-assets
|
||||
.tagName.txt
|
||||
.tagHeading.txt
|
||||
.releaseNotes.md
|
||||
.releaseTitle.md
|
8
.vscode/extensions.json
vendored
Normal file
8
.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"hbenl.test-adapter-converter",
|
||||
"hbenl.vscode-mocha-test-adapter",
|
||||
"hbenl.vscode-test-explorer"
|
||||
]
|
||||
}
|
25
.vscode/launch.json
vendored
Normal file
25
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Tests",
|
||||
"program": "${workspaceFolder}/node_modules/mocha/bin/mocha",
|
||||
"args": [
|
||||
"--timeout",
|
||||
"0"
|
||||
],
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchTask": "Build",
|
||||
"sourceMaps": true,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/**/*.js",
|
||||
"!**/node_modules/**"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
10
.vscode/settings.json
vendored
Normal file
10
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
|
||||
"javascript.format.placeOpenBraceOnNewLineForControlBlocks": true,
|
||||
"javascript.format.placeOpenBraceOnNewLineForFunctions": true,
|
||||
"typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
|
||||
"typescript.format.placeOpenBraceOnNewLineForControlBlocks": true,
|
||||
"typescript.format.placeOpenBraceOnNewLineForFunctions": true,
|
||||
"mochaExplorer.require": "source-map-support/register",
|
||||
"mochaExplorer.timeout": 0
|
||||
}
|
39
.vscode/tasks.json
vendored
Normal file
39
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Build",
|
||||
"type": "npm",
|
||||
"script": "watch",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": "$tsc-watch",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Rebuild",
|
||||
"type": "npm",
|
||||
"script": "rebuild",
|
||||
"problemMatcher": "$tsc",
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Lint",
|
||||
"type": "npm",
|
||||
"script": "lint-ide",
|
||||
"problemMatcher": "$eslint-stylish",
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
8
CHANGELOG.md
Normal file
8
CHANGELOG.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## ConnectForce [Unreleased]
|
||||
- Initial release
|
3911
package-lock.json
generated
Normal file
3911
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
47
package.json
Normal file
47
package.json
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "connect-force",
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"description": "A selfmade Connect Four game.",
|
||||
"author": "Manuel Thalmann <m@nuth.ch>",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./lib/index.d.ts",
|
||||
"default": "./lib/index.js"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -b tsconfig.build.json",
|
||||
"rebuild": "npm run clean && npm run build",
|
||||
"watch": "npm run build -- --watch",
|
||||
"clean": "npm run build -- --clean && rimraf ./lib",
|
||||
"lint": "eslint --max-warnings 0 ./src .eslintrc.cjs",
|
||||
"lint-ide": "npm run lint || exit 0",
|
||||
"test": "mocha",
|
||||
"prepare": "npm run rebuild"
|
||||
},
|
||||
"dependencies": {
|
||||
"ts-keyof": "^1.3.0",
|
||||
"ts-nameof-proxy": "^0.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@manuth/eslint-plugin-typescript": "^4.0.0",
|
||||
"@manuth/tsconfig": "^3.0.2",
|
||||
"@types/mocha": "^9.1.1",
|
||||
"@types/node": "^18.7.18",
|
||||
"eslint": "^8.23.1",
|
||||
"mocha": "^10.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-patch": "^2.0.2",
|
||||
"typescript": "^4.8.3"
|
||||
}
|
||||
}
|
5
src/index.ts
Normal file
5
src/index.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
// eslint-disable-next-line import/no-default-export
|
||||
export default async (): Promise<void> =>
|
||||
{
|
||||
console.log("Hello World");
|
||||
};
|
13
src/tests/main.test.ts
Normal file
13
src/tests/main.test.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { strictEqual } from "node:assert";
|
||||
|
||||
suite(
|
||||
"ConnectForce",
|
||||
() =>
|
||||
{
|
||||
test(
|
||||
"Example…",
|
||||
() =>
|
||||
{
|
||||
strictEqual(1, 1);
|
||||
});
|
||||
});
|
11
src/tests/tsconfig.json
Normal file
11
src/tests/tsconfig.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "..",
|
||||
"outDir": "../../lib"
|
||||
},
|
||||
"include": [
|
||||
"./**/*"
|
||||
],
|
||||
"references": []
|
||||
}
|
14
tsconfig.app.json
Normal file
14
tsconfig.app.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"extends": "./tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib"
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"./src/tests/**/*"
|
||||
]
|
||||
}
|
11
tsconfig.base.json
Normal file
11
tsconfig.base.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": "@manuth/tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"module": "Node16",
|
||||
"lib": [
|
||||
"ES2020"
|
||||
],
|
||||
"target": "ES6"
|
||||
}
|
||||
}
|
12
tsconfig.build.json
Normal file
12
tsconfig.build.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "./tsconfig.base.json",
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./src/tests"
|
||||
}
|
||||
]
|
||||
}
|
10
tsconfig.eslint.json
Normal file
10
tsconfig.eslint.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "./tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"checkJs": true
|
||||
},
|
||||
"include": [
|
||||
"./.eslintrc.cjs"
|
||||
]
|
||||
}
|
12
tsconfig.json
Normal file
12
tsconfig.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "./tsconfig.base.json",
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.build.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.eslint.json"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue