A utility for running programs (i.e. starting a Node server) when switching Sublime Text projects.
Follow the instructions to install Sublime Text's Package Control
- Open the Command Palette (default key-combo is Ctrl+Shift+P)
- Select "Package Control: Install Package"
- Search for sublime-npm-project and hit enter
By default, this package won't do anything. Go to Project > Edit Project and add a section called "projectrunner" like below:
{
"projectrunner":
{
"path": ".",
"start": true
},
"folders":
[
{
"path": "."
}
]
}
This will ask you when you open a new project whether you want to perform the startup action, which unless explicitly specified is "npm start". Note that by default, this is run from your project path.
"projectrunner":
{
"path": ".",
"start": "node scripts/start.js"
},
"projectrunner":
{
"path": "react/",
"start": true
},
"projectrunner":
{
"path": ".",
"start": false
},