当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 12 Fork 1

欲饮琵琶码上催 / bootstrap-quicktab
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rollup.config.js 2.02 KB
一键复制 编辑 原始数据 按行查看 历史
'use strict'
const json = require('@rollup/plugin-json')
const resolve = require('@rollup/plugin-node-resolve')
const commonjs = require('@rollup/plugin-commonjs')
const {babel} = require('@rollup/plugin-babel')
const terser = require('@rollup/plugin-terser')
const eslint = require('@rollup/plugin-eslint')
const pkg = require('./package')
const year = new Date().getFullYear()
const banner = `/*!
* bootstrap-quicktab v${pkg.version} (${pkg.homepage})
* Copyright 2021-${year} ${pkg.author}
* license ${pkg.license} (https://gitee.com/ajiho/bootstrap-quicktab/blob/master/LICENSE)
*/`
//注意:每次修改配置都要重新开启监听
module.exports = {
input: 'src/index.js',
output: [
{
banner,
file: 'dist/js/bootstrap-quicktab.js',
format: 'umd',
name: 'Quicktab'
},
{
banner,
file: 'dist/js/bootstrap-quicktab.min.js',
format: 'umd',
name: 'Quicktab',
plugins: [
terser({compress: {drop_console: false}})
]
},
//写入到docs目录下
{
banner,
file: 'docs/vendor/bootstrap-quicktab/dist/js/bootstrap-quicktab.js',
format: 'umd',
name: 'Quicktab'
},
{
banner,
file: 'docs/vendor/bootstrap-quicktab/dist/js/bootstrap-quicktab.min.js',
format: 'umd',
name: 'Quicktab',
plugins: [
terser({compress: {drop_console: false}})
]
}
],
//使用json插件
plugins: [
json(),
resolve(),
commonjs(),
eslint({
throwOnError: true,
throwOnWarning: true,
include: ['src/**'],
exclude: ['node_modules/**'],
fix:true
}),
babel({
exclude: 'node_modules/**',
// Include the helpers in the bundle, at most one copy of each
babelHelpers: 'bundled'
}),
]
}
1
https://gitee.com/ajiho/bootstrap-quicktab.git
git@gitee.com:ajiho/bootstrap-quicktab.git
ajiho
bootstrap-quicktab
bootstrap-quicktab
master

搜索帮助