0 Star 0 Fork 0

ctrlc-git/npm-cli-push

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
rollup.config.js 972 Bytes
一键复制 编辑 原始数据 按行查看 历史
提莫打野迷了路 提交于 2023-08-21 01:34 . feat: 添加插件
import { babel } from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import { resolve } from 'node:path';
import copy from 'rollup-plugin-copy';
const tsconfig = resolve('tsconfig.json');
export default {
input: 'src/index.ts',
output: [
{
file: 'lib/index.cjs',
format: 'cjs',
exports: 'none',
plugins: [terser()],
banner: '#!/usr/bin/env node',
},
],
external: ['semver', 'kolorist', 'inquirer'],
plugins: [
nodeResolve(),
// tsconfig 无效
typescript({ tsconfig, include: ['src/**/*'] }),
commonjs(),
json(),
babel({ babelHelpers: 'bundled' }),
copy({
targets: [
{
src: 'src/commit.sh',
dest: 'lib',
},
],
}),
],
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/ctrlc-git/ctrlc-npm-cli-push.git
[email protected]:ctrlc-git/ctrlc-npm-cli-push.git
ctrlc-git
ctrlc-npm-cli-push
npm-cli-push
master

搜索帮助