mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-11 14:20:07 +08:00
feat(cli): Pass package manager setting to dev server.
This commit is contained in:
parent
db2338dc34
commit
0425f07e4a
@ -26,6 +26,7 @@ async function runDevServer({ context }) {
|
||||
cwd: context.directories.devServer,
|
||||
env: {
|
||||
...process.env,
|
||||
LOWDEFY_PACKAGE_MANAGER: context.packageManager,
|
||||
LOWDEFY_DIRECTORY_CONFIG: context.directories.config,
|
||||
PORT: context.options.port,
|
||||
},
|
||||
|
@ -32,7 +32,7 @@ import startWatchers from './processes/startWatchers.mjs';
|
||||
const argv = yargs(hideBin(process.argv)).argv;
|
||||
|
||||
async function getContext() {
|
||||
const { packageManager = 'npm', verbose = false } = argv;
|
||||
const { verbose = false } = argv;
|
||||
const context = {
|
||||
directories: {
|
||||
build: path.resolve(process.cwd(), './build'),
|
||||
@ -41,7 +41,7 @@ async function getContext() {
|
||||
),
|
||||
server: process.cwd(),
|
||||
},
|
||||
packageManager,
|
||||
packageManager: argv.packageManager || process.env.LOWDEFY_PACKAGE_MANAGER || 'npm',
|
||||
port: argv.port || process.env.PORT || 3000,
|
||||
verbose,
|
||||
version: process.env.npm_package_version,
|
||||
|
Loading…
Reference in New Issue
Block a user