create-bento
Advanced tools
Comparing version 2.2.2 to 3.0.0
{ | ||
"name": "create-bento", | ||
"version": "2.2.2", | ||
"version": "3.0.0", | ||
"description": "Bootstrap your react libraries with typescript and storybook", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,5 +16,4 @@ { | ||
"build-esm": "rimraf esm && tsc", | ||
"build-cjs": "rimraf cjs && tsc --module commonjs --outDir cjs", | ||
"build-umd": "rimraf umd && rollup -c", | ||
"build": "yarn run build-esm && yarn run build-cjs && yarn run build-umd", | ||
"build-other": "rimraf umd && rimraf cjs && rollup -c", | ||
"build": "yarn run build-esm && yarn run build-other", | ||
"prepublishOnly": "{{manager}} run build" | ||
@@ -21,0 +20,0 @@ }, |
import resolve from "rollup-plugin-node-resolve"; | ||
import filesize from "rollup-plugin-filesize"; | ||
import { uglify } from "rollup-plugin-uglify"; | ||
import pkg from "./package.json"; | ||
@@ -8,41 +7,35 @@ import commonjs from "rollup-plugin-commonjs"; | ||
import json from "rollup-plugin-json"; | ||
import typescript from "rollup-plugin-typescript2"; | ||
const commonjsOptions = { | ||
ignoreGlobal: true, | ||
include: /node_modules/ | ||
}; | ||
const input = "src/index.ts"; | ||
const input = pkg.main; | ||
const plugins = [ | ||
resolve(), | ||
typescript({ | ||
typescript: require("typescript") | ||
}), | ||
commonjs(commonjsOptions), | ||
json(), | ||
cleanup(), | ||
uglify(), | ||
filesize() | ||
]; | ||
const globals = { | ||
react: "React", | ||
"react-doc": "ReactDOM" | ||
}; | ||
const externals = [ | ||
...Object.keys(pkg.dependencies || {}), | ||
...Object.keys(pkg.peerDependencies || {}) | ||
]; | ||
const capitalize = s => { | ||
if (typeof s !== "string") return ""; | ||
return s.charAt(0).toUpperCase() + s.slice(1); | ||
}; | ||
export default [ | ||
{ | ||
input, | ||
output: { | ||
file: "umd/{{name}}.js", | ||
format: "umd", | ||
name: capitalize("{{name}}"), | ||
globals | ||
}, | ||
external: Object.keys(globals), | ||
output: [ | ||
{ | ||
file: pkg.main, | ||
format: "cjs", | ||
sourcemap: true | ||
} | ||
], | ||
external: externals, | ||
plugins | ||
} | ||
]; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9208
241