Skip to content

Commit

Permalink
feat(cli-bundler): add --open flag
Browse files Browse the repository at this point in the history
enable `--open` or `-o` flag as a flag for the `au run` task.
this will open the default browser at the application location.
  • Loading branch information
avrahamcool committed Feb 4, 2018
1 parent ceb7860 commit 23fc079
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/resources/tasks/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let serve = gulp.series(
done => {
browserSync({
online: false,
open: false,
open: CLIOptions.hasFlag('open'),
port: 9000,
logLevel: 'silent',
server: {
Expand Down
5 changes: 5 additions & 0 deletions lib/resources/tasks/run.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
"name": "watch",
"description": "Watches source files for changes and refreshes the app automatically.",
"type": "boolean"
},
{
"name": "open",
"description": "Open the default browser at the application location.",
"type": "boolean"
}
]
}
2 changes: 1 addition & 1 deletion lib/resources/tasks/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let serve = gulp.series(
done => {
browserSync({
online: false,
open: false,
open: CLIOptions.hasFlag('open'),
port: 9000,
logLevel: 'silent',
server: {
Expand Down

0 comments on commit 23fc079

Please sign in to comment.