-
-
Notifications
You must be signed in to change notification settings - Fork 0
Dev #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #26
Changes from all commits
bd4b6ba
2a564ce
d04ba62
20c0321
b47dbdb
5b477a3
9bf627b
dd4e7ee
f1e7aa0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| registry=https://registry.npmjs.org/ | ||
| //registry.npmjs.org/:_authToken=${NPM_TOKEN} | ||
| save-prefix=^ | ||
| save-prefix=^ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,25 @@ | ||
| { | ||
| "name": "@nexgenstudiodev/fastkit", | ||
| "version": "2.4.0", | ||
| "description": "A comprehensive FastKit library with auth, database config, and utilities", | ||
|
|
||
| "type": "commonjs", | ||
| "version": "1.2.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "description": "A modular, class-based toolkit for fast API development with TypeScript and Express.", | ||
| "main": "dist/FastKit.js", | ||
| "types": "dist/FastKit.d.ts", | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
|
|
||
| "scripts": { | ||
| "format": "prettier --write 'src/**/*.{ts,tsx,js,json,md}'", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "lint": "eslint src/**/*.{ts,tsx}", | ||
| "lint:fix": "eslint src/**/*.{ts,tsx} --fix", | ||
| "link": "npm link @nexgenstudiodev/fastkit", | ||
| "build": "tsc && pnpm exec tsc-alias", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "link:manage": "ts-node src/script/manage-link.ts", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "manage": "ts-node src/script/index.ts" | ||
| }, | ||
|
|
||
| "keywords": [ | ||
| "fastkit", | ||
| "auth", | ||
|
|
@@ -82,8 +95,10 @@ | |
| "jest": "^30.0.3", | ||
| "lint-staged": "^16.1.2", | ||
| "prettier": "^3.6.2", | ||
| "prompts": "^2.4.2", | ||
| "rimraf": "^6.0.1", | ||
| "ts-jest": "^29.4.0", | ||
| "ts-node": "^10.9.2", | ||
| "ts-node-dev": "^2.0.0", | ||
| "tsc-alias": "^1.8.16", | ||
| "tsconfig-paths": "^4.2.0", | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { execSync } from 'child_process'; | ||
|
|
||
|
|
||
| export function build() { | ||
| console.log('Running clean...'); | ||
| execSync('rimraf dist', { stdio: 'inherit' }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| console.log('Compiling TypeScript...'); | ||
| execSync('tsc', { stdio: 'inherit' }); | ||
|
|
||
| console.log('Fixing path aliases...'); | ||
| execSync('pnpm exec tsc-alias', { stdio: 'inherit' }); | ||
|
|
||
| console.log('Build complete!'); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import prompts from 'prompts'; | ||
| import { build } from './build'; | ||
| import { startProd } from './production'; | ||
| import { publish } from './publish'; | ||
|
|
||
| async function main() { | ||
| const response = await prompts({ | ||
| type: 'select', | ||
| name: 'command', | ||
| message: 'Which script do you want to run?', | ||
| choices: [ | ||
| { title: 'Build', value: 'build' }, | ||
| { title: 'Start Production', value: 'prod' }, | ||
| { title: 'Publish', value: 'publish' }, | ||
| { title: 'Exit', value: 'exit' }, | ||
| ], | ||
| }); | ||
|
|
||
| switch (response.command) { | ||
| case 'build': | ||
| build(); | ||
| break; | ||
| case 'prod': | ||
| startProd(); | ||
| break; | ||
| case 'publish': | ||
| publish(); | ||
| break; | ||
| default: | ||
| console.log('Exiting...'); | ||
| process.exit(0); | ||
| } | ||
| } | ||
|
|
||
| main(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { execSync } from 'child_process'; | ||
|
|
||
| export function startProd() { | ||
| console.log('Running pre-production tasks: format, lint, build'); | ||
| execSync('pnpm run format && pnpm run lint --fix && pnpm run build', { stdio: 'inherit' }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| console.log('Starting production server...'); | ||
| execSync('node dist/index.js', { stdio: 'inherit' }); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { execSync } from 'child_process'; | ||
|
|
||
| /** | ||
| * Bump version, run format/lint/build, then publish | ||
| * @param bumpType one of 'patch' | 'minor' | 'major' (default: patch) | ||
| * @param tag optional npm tag (e.g., 'beta') | ||
| */ | ||
| function publishWithVersionBump(bumpType = 'patch', tag?: string) { | ||
| console.log(`Bumping version (${bumpType})...`); | ||
| execSync(`npm version ${bumpType}`, { stdio: 'inherit' }); | ||
|
|
||
| console.log('Running prepublish tasks: format, lint, build'); | ||
| execSync('pnpm run format && pnpm run lint && pnpm run build', { stdio: 'inherit' }); | ||
|
|
||
| const publishCmd = tag | ||
| ? `npm publish --access public --tag ${tag}` | ||
| : 'npm publish --access public'; | ||
|
|
||
| console.log(`Publishing${tag ? ` with tag "${tag}"` : ''} to npm...`); | ||
| execSync(publishCmd, { stdio: 'inherit' }); | ||
| } | ||
|
|
||
| export function publish() { | ||
| publishWithVersionBump('patch'); | ||
| } | ||
|
|
||
| export function publishBeta() { | ||
| publishWithVersionBump('patch', 'beta'); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| import {} from '@nexgenstudiodev/fastkit' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The section title here is
SETUP.md, but this file isPACKAGE_MANAGERS.md. This appears to be a copy-paste error and could be confusing for readers. Please correct the title to be relevant to this file.