Comments (5)
Thank you
from rush-monorepo-boilerplate.
@Artak-Mkrtchyan I would suggest to use command-line.json
to create your commands, the benefit of it is you can run the commands from different folders in your monorepo, so you don't need to run the command from the root.
If you want to start multiple projects, you can use a bulk
command. Something like this:
{
"name": "start",
"commandKind": "bulk",
"summary": "Starts all projects in the repo",
"description": "Iterates through each project in the repo and runs the 'start' script",
"enableParallelism": true,
"safeForSimultaneousRushProcesses": true,
"ignoreMissingScript": true,
"ignoreDependencyOrder": true
},
This command will go through all your packages and will execute the start
script. This thing will be done in parallel and will skip the package if there is no start
command. (Also you can target only the desired packages with rush start --only @monorepo/react-app --only @monorepo/react-second-app
). This might work in multiple cases, but if you're working with react ,you would want to see the errors output from your webpack-dev-server
. In this case you can create a command for each project to start it ( also in command-line.json
.
{
"name": "start:react-app",
"commandKind": "global",
"summary": "Start the react-app project",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "cd apps/react-app && rushx start"
},
{
"name": "start:react-second-app",
"commandKind": "global",
"summary": "Start the react-second-app project",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "cd apps/react-second-app && rushx start"
}
So from anywhere in your monorepo you can run rush start:react-app
in a terminal and you'll have the output from webpack. Same for the second app : start:react-second-app
.
I hope that helps you.
from rush-monorepo-boilerplate.
@Artak-Mkrtchyan I have created a branch with those commands, so you can play around to see if that solves your issue.
https://github.com/abereghici/rush-monorepo-boilerplate/tree/start_multiple_projects
from rush-monorepo-boilerplate.
Should I create a script or I should use common/config/rush/command-line.json ?
from rush-monorepo-boilerplate.
because if I use the global command and try to run project 1 and project 2
from rush-monorepo-boilerplate.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rush-monorepo-boilerplate.