Nuxt/packages/nuxt-pack/build.js
Clark Du ea8c2a6505
feat: move build to packages (#4031)
* feat: move build to packages

* fix: remove build in eslint

* refactor: rename nuxt-build to nuxt-pack
2018-10-03 19:50:22 +01:00

22 lines
445 B
JavaScript

import path from 'path'
import Package from './package'
// Commons
const rootDir = path.resolve(__dirname, '..', '..')
// Force NODE_ENV to production
process.env.NODE_ENV = 'production'
// Packages
const packages = [
'.',
'packages/nuxt-start',
'packages/nuxt-legacy'
]
// Build all packages
packages
.map(p => path.resolve(rootDir, p))
.map(p => new Package({ rootDir: path.resolve(rootDir, p) }))
.forEach(pkg => pkg.build())