diff --git a/README.md b/README.md index bf1dee4..5124879 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,9 @@ ## Description -This repository is a starter template for NodeJS projects using the latest versions of TypeScript, ESBuild, ESLint, Prettier, and Jest. Use it to create NPM packages, CLI applications, and more. +This repository is a starter template for NodeJS projects using the latest versions of TypeScript, Vite, ESLint, Prettier, and Jest. Use it to create NPM packages/libraries, React/Vue applications or component libraries, and more. -It also optionally uses [Madge](https://github.com/pahen/madge) to visualize connections between classes and files within your project. - -Want to use `.env` files in your project? This will configure it automatically, if you want it to. - -Want to use a configuration file in your project? This will configure it automatically, too, if you ask it to. +It optionally uses [Madge](https://github.com/pahen/madge) to visualize connections between classes and files within your project. ## Template Setup diff --git a/biome.json b/biome.json index c4be779..90cf222 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.4.0/schema.json", + "$schema": "https://biomejs.dev/schemas/1.5.0/schema.json", "files": { "include": ["./*.cjs", "./*.js", "./*.mjs", "src/**/*.js", "src/**/*.ts"], "ignore": [".vscode/**", ".idea/**", ".git/**", ".husky/**", "build/**", "configure-package.js", "dist/**", "node_modules/**", "scripts/**"] diff --git a/package.json b/package.json index de39359..1ff0025 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,10 @@ "description": "{{package.description}}", "author": "{{package.author.name}} <{{package.author.email}}>", "license": "MIT", - "keywords": ["nodejs", "typescript"], + "keywords": [ + "nodejs", + "typescript" + ], "homepage": "https://github.com/{{vendor.github}}/{{package.name}}", "readme": "./README.md", "repository": { @@ -14,7 +17,13 @@ "bugs": { "url": "https://github.com/{{vendor.github}}/{{package.name}}/issues" }, - "files": ["dist", "README.md", "LICENSE", "package.json", "CHANGELOG.md"], + "files": [ + "dist", + "README.md", + "LICENSE", + "package.json", + "CHANGELOG.md" + ], "type": "module", "main": "./dist/index.umd.cjs", "module": "./dist/index.js", @@ -31,55 +40,53 @@ "prettier --config prettier.config.js --write", "eslint --config .eslintrc.cjs --fix" ], - "*.{css,gql,graphql,html,json,less,md,mdx,sass,scss}": ["prettier --config prettier.config.js --write"], - "*.{yaml,yml}": ["prettier --config prettier.config.js --tab-width 2 --write"] + "*.{css,gql,graphql,html,json,less,md,mdx,sass,scss}": [ + "prettier --config prettier.config.js --write" + ], + "*.{yaml,yml}": [ + "prettier --config prettier.config.js --tab-width 2 --write" + ] }, "scripts": { - "analyze:deps:circular": "madge --extensions js,ts --circular --ts-config tsconfig.json src/**", - "analyze:deps:list": "madge --extensions js,ts --ts-config tsconfig.json src/**", - "analyze:deps:graph": "madge --extensions js,ts --image graph.svg --layout dot --ts-config tsconfig.json src/**", - "test": "jest tests --verbose", - "test:coverage": "jest tests --coverage", + "analyze": "madge --extensions js,ts --circular --ts-config tsconfig.json src/**", + "analyze:deps": "madge --extensions js,ts --ts-config tsconfig.json src/**", + "analyze:image": "madge --extensions js,ts --image graph.svg --layout dot --ts-config tsconfig.json src/**", + "build": "npm run build:prod && npm run build:dts", + "build:dts": "dts-bundle-generator -o dist/index.d.ts src/index.ts", + "build:prod": "vite build --mode production", + "dev": "vite", + "fix": "npm run fmt && npm run lint:fix", "fmt": "biome format --no-errors-on-unmatched --write . && prettier --config prettier.config.js --write .", "lint": "eslint --config .eslintrc.cjs --ext ts,js src/", "lint:fix": "biome lint --apply-unsafe src/ && eslint --config .eslintrc.cjs --ext ts,js --fix src/", "lint:staged": "lint-staged", - "fix": "npm run fmt && npm run lint:fix", - "build:api-docs": "typedoc --plugin typedoc-plugin-markdown --out docs/api src/index.ts", - "build:dev": "vite build", - "build:prod": "vite build --mode production", - "build:binaries": "node --no-warnings scripts/build.cjs --binaries", - "build:dts": "dts-bundle-generator -o dist/index.d.ts src/index.ts", - "build": "npm run build:dev && npm run build:dts", - "dev": "npm run build:dev && node dist/index.js", + "test": "jest tests --verbose", "prepare": "husky install", "version": "auto-changelog -p -o CHANGELOG.md --hide-credit --release-summary --hide-empty-releases --sort-commits date-desc && git add CHANGELOG.md" }, "devDependencies": { "@biomejs/biome": "1.5.0", "@types/jest": "^29.5.11", - "@types/node": "^20.10.5", - "@typescript-eslint/eslint-plugin": "^6.15.0", - "@typescript-eslint/parser": "^6.15.0", + "@types/node": "^20.11.0", + "@typescript-eslint/eslint-plugin": "^6.18.1", + "@typescript-eslint/parser": "^6.18.1", "auto-changelog": "^2.4.0", - "dts-bundle-generator": "^9.0.0", - "esbuild": "^0.19.10", + "dts-bundle-generator": "^9.2.4", + "esbuild": "^0.19.11", "eslint": "^8.56.0", - "eslint-plugin-jest": "^27.6.0", + "eslint-plugin-jest": "^27.6.3", "eslint-plugin-node": "^11.1.0", "husky": "^8.0.3", "jest": "^29.7.0", "lint-staged": "^15.2.0", "madge": "^6.1.0", - "prettier": "^3.1.1", + "prettier": "^3.2.1", "ts-jest": "^29.1.1", - "typedoc": "^0.25.4", - "typedoc-plugin-markdown": "^3.17.1", "typescript": "^5.3.3", - "vite": "^5.0.10" + "vite": "^5.0.11" }, "bin": "bin/{{package.name}}", "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }