zoro-cli
Version:
https://github.com/vuejs/vue-cli
26 lines (20 loc) • 618 B
JavaScript
module.exports = ({ api, rootOptions, Types, pkg }) => {
const { type, ui, cssPreprocessor } = rootOptions
const { weblib, nodelib } = Types
if (type === weblib || type === nodelib) {
delete pkg.private
api.render('./template')
if (cssPreprocessor === 'postcss') {
api.render('./template-postcss')
}
const files = ['bin', 'lib', 'src', 'dist', 'index.js']
if (ui === 'vue') {
files.push('vue')
}
api.extendPackage({
files,
// https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
types: './lib/index.d.ts',
})
}
}