add temp
This commit is contained in:
commit
c622010ee2
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
dist
|
3
bin/code.js
Normal file
3
bin/code.js
Normal file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
console.log('Hello World');
|
33
package.json
Normal file
33
package.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "@kevisual/code-builder",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "rollup -c"
|
||||
},
|
||||
"keywords": [],
|
||||
"files": [
|
||||
"dist",
|
||||
"bin",
|
||||
"tsconfig.json"
|
||||
],
|
||||
"author": "abearxiong <xiongxiao@xiongxiao.me>",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@kevisual/router": "0.0.7",
|
||||
"@kevisual/use-config": "^1.0.8",
|
||||
"nanoid": "^5.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^28.0.2",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.0",
|
||||
"@rollup/plugin-typescript": "^12.1.2",
|
||||
"@types/node": "^22.13.5",
|
||||
"rollup": "^4.34.8",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
}
|
1608
pnpm-lock.yaml
generated
Normal file
1608
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
23
src/index.ts
Normal file
23
src/index.ts
Normal file
@ -0,0 +1,23 @@
|
||||
// rollup.config.js
|
||||
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import json from '@rollup/plugin-json';
|
||||
|
||||
import { rollup } from 'rollup';
|
||||
|
||||
export const build = async () => {
|
||||
const bundle = await rollup({
|
||||
input: 'src/index.ts',
|
||||
output: {
|
||||
file: 'dist/app.mjs',
|
||||
format: 'es',
|
||||
},
|
||||
watch: {
|
||||
include: 'src/**',
|
||||
},
|
||||
// @ts-ignore
|
||||
plugins: [typescript(), resolve(), commonjs(), json()],
|
||||
});
|
||||
};
|
5
src/modules/config.ts
Normal file
5
src/modules/config.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { resolve } from 'path';
|
||||
|
||||
export const runPath = () => {
|
||||
return resolve(process.cwd());
|
||||
};
|
33
tsconfig.json
Normal file
33
tsconfig.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "nodenext",
|
||||
"target": "esnext",
|
||||
"noImplicitAny": false,
|
||||
"outDir": "./dist",
|
||||
"sourceMap": false,
|
||||
"allowJs": true,
|
||||
"newLine": "LF",
|
||||
"baseUrl": "./",
|
||||
"typeRoots": [
|
||||
"node_modules/@types",
|
||||
// "node_modules/@kevisual/types"
|
||||
],
|
||||
"declaration": true,
|
||||
"noEmit": false,
|
||||
"allowImportingTsExtensions": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"moduleResolution": "NodeNext",
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
],
|
||||
"exclude": [],
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user