Adding package.json to template
This commit is contained in:
parent
43849834d3
commit
51d86ab31b
24
repo-template/node-based-repo/.dockerignore
Normal file
24
repo-template/node-based-repo/.dockerignore
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
node_modules/
|
||||||
|
.pnpm-store/
|
||||||
|
|
||||||
|
.npm/
|
||||||
|
# Can't include git in docker ignore - needs to be present in publisher image
|
||||||
|
# .git/
|
||||||
|
# #short_ref needed in BUILD_VERSION
|
||||||
|
# !.git/short_ref
|
||||||
|
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
data/
|
||||||
|
build/
|
||||||
|
cloud/
|
||||||
|
snowpack/
|
||||||
|
|
||||||
|
# ESlint coverage files
|
||||||
|
.coverage.eslint.codeframe
|
||||||
|
coverage/
|
||||||
|
.nyc_output/
|
||||||
|
# test/ -- test folder needs to be a part of the docker context so that it's present in the publisher image (in which tests are run)
|
||||||
|
|
||||||
|
dev/pgadmin4/.pgpass
|
||||||
15
repo-template/node-based-repo/.editorconfig
Normal file
15
repo-template/node-based-repo/.editorconfig
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# EditorConfig is awesome: http://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# Unix-style newlines with a newline ending every file
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = space
|
||||||
|
|
||||||
|
# Matches multiple files with brace expansion notation
|
||||||
|
# Set default charset
|
||||||
|
[*.{js,jsx,ts,tsx,py,sh,md,njk,json}]
|
||||||
|
charset = utf-8
|
||||||
|
indent_size = 2
|
||||||
76
repo-template/node-based-repo/.gitignore
vendored
Normal file
76
repo-template/node-based-repo/.gitignore
vendored
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
stats.json
|
||||||
|
statsProd.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
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
.pnpm-store/
|
||||||
|
|
||||||
|
# Typescript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
|
||||||
|
# Build folders
|
||||||
|
data/
|
||||||
|
build/
|
||||||
|
cloud/
|
||||||
|
lib
|
||||||
|
|
||||||
|
# ESlint coverage files
|
||||||
|
coverage.eslint
|
||||||
|
|
||||||
|
# IDE Specific
|
||||||
|
.idea/
|
||||||
|
.cache/
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/launch.json
|
||||||
25
repo-template/node-based-repo/eslint.config.mjs
Normal file
25
repo-template/node-based-repo/eslint.config.mjs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import eslint from "@eslint/js";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
|
export default tseslint.config(
|
||||||
|
eslint.configs.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
{
|
||||||
|
"files": ["src/**/*.{js,ts,jsx,tsx}"],
|
||||||
|
rules: {
|
||||||
|
"no-undef": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/triple-slash-reference": "warn",
|
||||||
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
"ignoreRestSiblings": true,
|
||||||
|
"argsIgnorePattern": "(^_|^req$|^request$|^res$|^next$|^h$)",
|
||||||
|
"varsIgnorePattern": "(^_|^req$|^request$|^res$|^next$|^h$)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@typescript-eslint/ban-ts-comment": "warn",
|
||||||
|
"no-async-promise-executor": "off"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
44
repo-template/node-based-repo/package.json
Normal file
44
repo-template/node-based-repo/package.json
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"name": "@gmetrivr/definitions",
|
||||||
|
"version": "1.0.163",
|
||||||
|
"description": "GMetri Definitions",
|
||||||
|
"types": "./lib/esm/index.d.ts",
|
||||||
|
"@comment main": "This key is still kept around until older version of node that don't understand exports key are used",
|
||||||
|
"main": "./lib/cjs/index.js",
|
||||||
|
"exports": {
|
||||||
|
"require": "./lib/cjs/index.js",
|
||||||
|
"import": "./lib/esm/index.js"
|
||||||
|
},
|
||||||
|
"repository": "https://git.gmetri.io/gmetrivr/definitions",
|
||||||
|
"author": "GMetri <admin@gmetri.com>",
|
||||||
|
"license": "UNLICENSED",
|
||||||
|
"sideEffects": false,
|
||||||
|
"type": "module",
|
||||||
|
"files": [
|
||||||
|
"lib/*"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"@comment TEST": "Useful for testing",
|
||||||
|
"check": "$(pnpm bin)/tsc --noEmit",
|
||||||
|
"lint": "$(pnpm bin)/eslint ./src",
|
||||||
|
"circular": "npx madge --circular --extensions ts src/index.ts",
|
||||||
|
"@comment PUBLISH": "Used for publishing this repo",
|
||||||
|
"build_npm": "rm -rf lib; pnpm buildpackagejson && pnpm buildesm && pnpm buildcjs",
|
||||||
|
"buildpackagejson": "tsconfig-to-dual-package ./src/tsconfig-esm.json ./src/tsconfig-cjs.json",
|
||||||
|
"buildesm": "./node_modules/.bin/tsc --project src/ -p src/tsconfig-esm.json;",
|
||||||
|
"buildcjs": "./node_modules/.bin/tsc --project src/ -p src/tsconfig-cjs.json;"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@gmetrixr/gdash": "1.*.*"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.20.0",
|
||||||
|
"@gmetrixr/gdash": "^1.3.87",
|
||||||
|
"@tsconfig/node22": "^22.0.0",
|
||||||
|
"eslint": "^9.20.1",
|
||||||
|
"tsconfig-to-dual-package": "^1.2.0",
|
||||||
|
"tsx": "^4.19.2",
|
||||||
|
"typescript": "^5.7.3",
|
||||||
|
"typescript-eslint": "^8.21.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
repo-template/node-based-repo/sd
Executable file
2
repo-template/node-based-repo/sd
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
./fab/sh/compose_up.sh $@
|
||||||
2
repo-template/node-based-repo/std
Executable file
2
repo-template/node-based-repo/std
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
./fab/sh/compose_down.sh
|
||||||
26
repo-template/node-based-repo/tsconfig.json
Normal file
26
repo-template/node-based-repo/tsconfig.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"extends": "@tsconfig/node22/tsconfig.json",
|
||||||
|
//https://www.typescriptlang.org/tsconfig/#module
|
||||||
|
"files": ["src/index.ts"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "Node16",
|
||||||
|
"moduleResolution": "node16",
|
||||||
|
"outDir": "./out",
|
||||||
|
// default set of type definitions for built-in JS APIs. Which this a lot of default JS objects become available
|
||||||
|
"lib": ["es2023", "DOM"],
|
||||||
|
// allow jsx syntax
|
||||||
|
"jsx": "preserve",
|
||||||
|
// Generate .d.ts files
|
||||||
|
"declaration": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"noImplicitAny": true
|
||||||
|
// Using isolatedModules. So no longer exporting const enums. Just enums.
|
||||||
|
// "preserveConstEnums": true,
|
||||||
|
},
|
||||||
|
"ts-node": {
|
||||||
|
//https://typestrong.org/ts-node/docs/imports/#native-ecmascript-modules
|
||||||
|
// Tell ts-node CLI to install the --loader automatically, explained below
|
||||||
|
"esm": true
|
||||||
|
},
|
||||||
|
"include": ["src"],
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user