build: remove lerna

This commit is contained in:
Evan You
2019-12-10 18:24:59 -05:00
parent 7aca27392f
commit cd5ba7cfcc
8 changed files with 84 additions and 2448 deletions

View File

@@ -3,12 +3,12 @@ import path from 'path'
import ts from 'rollup-plugin-typescript2'
import replace from '@rollup/plugin-replace'
import json from '@rollup/plugin-json'
import lernaJson from './lerna.json'
if (!process.env.TARGET) {
throw new Error('TARGET package must be specified via --environment flag.')
}
const masterVersion = require('./package.json').version
const packagesDir = path.resolve(__dirname, 'packages')
const packageDir = path.resolve(packagesDir, process.env.TARGET)
const name = path.basename(packageDir)
@@ -137,7 +137,7 @@ function createReplacePlugin(
) {
return replace({
__COMMIT__: `"${process.env.COMMIT}"`,
__VERSION__: `"${lernaJson.version}"`,
__VERSION__: `"${masterVersion}"`,
__DEV__: isBundlerESMBuild
? // preserve to be handled by bundlers
`(process.env.NODE_ENV !== 'production')`