Skip to content

Commit

Permalink
feat(rollup): add BUILD_NAME
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds committed Sep 8, 2017
1 parent 169ba3b commit 1956e5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ const rollupAlias = require('rollup-plugin-alias')
const {pkg, hasFile, hasPkgProp, parseEnv} = require('../utils')

const here = p => path.join(__dirname, p)
const capitalize = s => s[0].toUpperCase() + s.slice(1)

const minify = parseEnv('BUILD_MINIFY', false)
const format = process.env.BUILD_FORMAT
const isPreact = parseEnv('BUILD_PREACT', false)

const capitalize = s => s[0].toUpperCase() + s.slice(1)
const name = process.env.BUILD_NAME || capitalize(camelcase(pkg.name))

const defaultGlobals = Object.keys(
pkg.peerDependencies || {},
Expand Down Expand Up @@ -88,7 +88,7 @@ module.exports = {
input: 'src/index.js',
output,
exports: esm ? 'named' : 'default',
name: capitalize(camelcase(pkg.name)),
name,
external,
globals,
plugins: [
Expand Down

0 comments on commit 1956e5e

Please sign in to comment.