Skip to content

Commit ffeefa9

Browse files
committed
Adding cross platform way to run app in 1 command (#2485)
* Adding cross platform way to run app in 1 command * Fixing readme
1 parent 9217d4a commit ffeefa9

8 files changed

+1494
-36
lines changed

README.md

+2-26
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,11 @@
1010

1111
``` bash
1212
git clone [email protected]:Azure/azure-functions-ux.git
13-
# there are 2 places to restore packages in
14-
cd azure-functions-ux/server
15-
yarn install
16-
yarn run gulp build-all
17-
cd ../AzureFunctions.AngularClient
13+
# there is a gulp process to build and run everything
1814
yarn install
15+
yarn run gulp run-dev
1916
```
2017

21-
to run the server
22-
23-
```bash
24-
cd server
25-
yarn run watch
26-
```
27-
28-
this will launch the server watching the files for any changes and will trigger a rebuild. To run the client in the same way
29-
30-
```bash
31-
cd AzureFunctions.AngularClient
32-
yarn run watch
33-
```
34-
35-
you have to do this at least once (or `yarn run build`) for the page to load.
36-
37-
If you're using bash and want to run both you can run the following from the top level
38-
39-
```bash
40-
> ./run.sh
41-
```
4218

4319
4. Visit `https://portal.azure.com?websitesextension_ext=appsvc.env=local` and load up Function Apps from browse
4420

gulpfile.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const gulp = require('gulp');
2+
var shell = require('shelljs');
3+
var gulpMultiProcess = require('gulp-multi-process');
4+
gulp.task('run-dev', function (cb) {
5+
return gulpMultiProcess(['run-angular', 'run-server'], cb);
6+
});
7+
8+
gulp.task('run-angular', function (cb) {
9+
shell.cd('AzureFunctions.AngularClient');
10+
shell.exec('yarn install');
11+
shell.exec('yarn run watch', (code, stdout, stderr) => {
12+
cb();
13+
});
14+
});
15+
16+
gulp.task('run-server', (cb) => {
17+
const runServerCommand = process.platform === 'win32' ? 'yarn run watch' : 'yarn run watchu';
18+
shell.cd('server');
19+
shell.exec('yarn install');
20+
shell.exec('gulp build-all', {async:true});
21+
shell.exec(runServerCommand, (code, stdout, stderr) => {
22+
cb();
23+
});
24+
25+
});

package-lock.json

-3
This file was deleted.

package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "azure-functions-ux-build",
3+
"version": "0.0.0",
4+
"scripts": {
5+
},
6+
"dependencies": {
7+
"gulp": "^3.9.1",
8+
"gulp-multi-process": "^1.3.1",
9+
"shelljs": "^0.8.1"
10+
}
11+
}

run.cmd

Whitespace-only changes.

run.ps1

Whitespace-only changes.

run.sh

-7
This file was deleted.

0 commit comments

Comments
 (0)