Skip to content

Commit

Permalink
Merge pull request #17 from blackwuxin/master
Browse files Browse the repository at this point in the history
 优化启动服务,切换目录使用绝对路径
  • Loading branch information
blackwuxin authored Apr 16, 2019
2 parents 5c598d4 + 69680fd commit fefc147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/crn-cli/commands/server/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function modifyScript(webPort) {
var winCommand = [
"@echo off",
"title React Packager",
`cd ..`,
`cd ${process.cwd()}`,
`node ${path.resolve(
process.cwd(),
"node_modules/react-native/local-cli/cli.js"
Expand Down Expand Up @@ -98,7 +98,7 @@ function modifyScript(webPort) {
var packagerPath = path.resolve(TMP_PATH, "packager.sh");
var shCommand = [
"#!/usr/bin/env bash",
`cd ..`,
`cd ${process.cwd()}`,
`node ${cliPath} start --port ${webPort} --config ${rnCliConfigPath}`
].join("\n");
fs.writeFileSync(packagerPath, shCommand, "utf8");
Expand Down

0 comments on commit fefc147

Please sign in to comment.