-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: script to build demo-app for firebase #4330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tools/gulp/tasks/development.ts
Outdated
@@ -28,3 +37,10 @@ task(':serve:devapp', serverTask(outDir, true)); | |||
task('serve:devapp', ['build:devapp'], sequenceTask( | |||
[':serve:devapp', 'material:watch', ':watch:devapp'] | |||
)); | |||
|
|||
/** Task that copies all vendors into the demo-app package. Allows hosting the app on firebase. */ | |||
task('build-deploy:devapp', ['build:devapp'], () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the name, I feel like it should be build:[something]
, build-deploy
makes it sound like it's both building and deploying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about prepare-deploy:devapp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build:devapp-for-deploy
?
@jelbourn any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally you have two different ways to do it:
[action]:[scope]
(A few times like in this file)[scope]:[action]
(Most of the time)
It should be either one of these to not mix naming. At some point we will make all of those consistent anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to just pick a name for now we can go back and change it when we consistent-ify everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Named it prepare-deploy:devapp
for now. Let's wait for @jelbourn's feedback before I apply merge ready.
tools/gulp/tasks/development.ts
Outdated
@@ -28,3 +37,10 @@ task(':serve:devapp', serverTask(outDir, true)); | |||
task('serve:devapp', ['build:devapp'], sequenceTask( | |||
[':serve:devapp', 'material:watch', ':watch:devapp'] | |||
)); | |||
|
|||
/** Task that copies all vendors into the demo-app package. Allows hosting the app on firebase. */ | |||
task('prepare-deploy:devapp', ['build:devapp'], () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just make it deploy:devapp
and have it also run the firebase deploy
? Anyone running this will almost certainly just run the deploy right after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought about doing that as well, but it looks like it would require me:
- To specify a firebase project I want to deploy to (not very flexible then - from here)
- And there would be the ugly
goOffline()
stuff (hope they improve it at some point..)
Do we have a firebase project we always want to use? If so I can use that one (but not flexible I think)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't require specifying a firebase project. Typically someone will do firebase use xxx
first.
I don't know what you mean by the goOffline()
stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use different ones since i like to have demos for different PRs going at the same time, maybe make it an argument? this looks promising: https://www.npmjs.com/package/yargs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jelbourn Not sure, didn't try it with the Firebase-Tools API yet. Will try it later.
With the goOffline()
stuff I meant that you manually need to "close" the firebase connection, because otherwise the Gulp task will run forever.
@mmalerba That would be an option, but sounds IMO a bit weird to parse arguments in an gulp task.
The advantage of having a task like prepare-deploy
is, that we might want to make the demo-app "deploy-able", but don't want to publish it immediately. e.g when having the PR previews bot.
Let me see if I need to specify a firebase project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devversion we can still have the gulp task for just the build part- maybe stage:devapp
? I just suspect people wouldn't need to use it much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Adds a new gulp task that can be used to build the devapp in "deploy"-mode. This allows us to deploy the demo-app on firebase. Fixes angular#3857
aa9c1a6
to
a3c5768
Compare
a3c5768
to
e75704b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #3857