mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
chore: fix minor issues in build scripts (#7458)
This commit is contained in:
parent
be726e42b6
commit
893cfe79d3
@ -2,7 +2,7 @@ const path = require('path')
|
||||
const consola = require('consola')
|
||||
const execa = require('execa')
|
||||
const fs = require('fs-extra')
|
||||
const glob = require('pify')(require('glob').glob)
|
||||
const glob = require('pify')(require('glob'))
|
||||
|
||||
async function main () {
|
||||
const packageDirs = await glob('+(packages|distributions)/*')
|
||||
|
@ -27,7 +27,7 @@ async function main () {
|
||||
// Step 1: Apply suffixes
|
||||
for (const pkg of workspacePackages) {
|
||||
if (pkg.options.suffix && pkg.options.suffix.length) {
|
||||
await pkg.suffixAndVersion()
|
||||
pkg.suffixAndVersion()
|
||||
await pkg.writePackage()
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import spawn from 'cross-spawn'
|
||||
import { existsSync, readJSONSync, writeFile, copy, remove } from 'fs-extra'
|
||||
import _ from 'lodash'
|
||||
import { rollup, watch } from 'rollup'
|
||||
import { glob as _glob } from 'glob'
|
||||
import _glob from 'glob'
|
||||
import pify from 'pify'
|
||||
import sortPackageJson from 'sort-package-json'
|
||||
|
||||
@ -239,11 +239,6 @@ export default class Package {
|
||||
this.formatError(event.error)
|
||||
return this.logger.error(event.error)
|
||||
|
||||
// Encountered an unrecoverable error
|
||||
case 'FATAL':
|
||||
this.formatError(event.error)
|
||||
return this.logger.fatal(event.error)
|
||||
|
||||
// Unknown event
|
||||
default:
|
||||
return this.logger.info(JSON.stringify(event))
|
||||
@ -330,7 +325,7 @@ export default class Package {
|
||||
}
|
||||
|
||||
exec (command, args, silent = false) {
|
||||
const r = spawn.sync(command, args.split(' '), { cwd: this.options.rootDir }, { env: process.env })
|
||||
const r = spawn.sync(command, args.split(' '), { cwd: this.options.rootDir, env: process.env })
|
||||
|
||||
if (!silent) {
|
||||
const fullCommand = command + ' ' + args
|
||||
|
Loading…
Reference in New Issue
Block a user