add temp
This commit is contained in:
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());
|
||||
};
|
||||
Reference in New Issue
Block a user