Skip to content
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

Run 'deps' in server & build tasks #2

Open
casio opened this issue Mar 26, 2013 · 9 comments
Open

Run 'deps' in server & build tasks #2

casio opened this issue Mar 26, 2013 · 9 comments

Comments

@casio
Copy link
Contributor

casio commented Mar 26, 2013

Generating a project with the generator and subsequently running grunt server will open the app without the deps.js file existing yet.

Since the tasks is rather fast, IMHO deps should be run at the beginning of server and maybe `build, as well.

@thanpolas
Copy link
Owner

hmmm are you sure about this? The fresh generated project contains a proper deps.js file...

@casio
Copy link
Contributor Author

casio commented Oct 15, 2013

Have not tested recent versions lately, so I didnt yet realize deps.js is being created now.

However, running deps in server could also be beneficial eg. when you just pulled recent changes from a repo that introduced new depencencies or similar. Dunno, just my 2 cents.

@ostronom
Copy link

Any changes to goog.required scripts won't be mirrored in deps.js in server-mode until you explicitly launch grunt deps (this is the behaviour of vanilla app generated by this generator).

(btw, live-reloading doesn't work in vanilla app either)

@thanpolas
Copy link
Owner

@ostronom that's the expected behavior... why didn't you open a new issue for the live-reloading? does the problem persist? If so please open a new issue

@casio running deps on server is a major nono for so many reasons... On server only your compiled app should land...

@casio
Copy link
Contributor Author

casio commented Nov 25, 2013

@thanpolas err, the 'server' we're talking about here is a local dev server with livereload & whatnot and by no means a production server.
We're both talking about the grunt server command, I think?

@thanpolas
Copy link
Owner

@casio i see...

So what's the issue here? I am not sure i completely understand...

If it's about deps automation, then you have to setup your gruntfile as it'd fit your needs... i can help with that... or it's something else?

@casio
Copy link
Contributor Author

casio commented Nov 25, 2013

@thanpolas I just created this very minor ticket as a little hint regrading developer convenience..U know, so guys checking out the generator would have a proper git clone, npm install, launch & success experience : )

Really minor, so please close as you see fit. However, @ostronom's argument might be worth considering...

@thanpolas
Copy link
Owner

I see, i will do a full regression test soon and if all checks out i'll close the issue.

for the record, i don't consider adding the grunt deps task to livereload/watch, i might add the option commented out in the Gruntfile so it's activated by folks that require it.

Deps generation is decoupled and irrelevant with the watch tasks. The deps task needs to run whenever a change in the deps tree of your product has changed, that doesn't happen with every file change.... Personally, i have the grunt deps command as a shortcut key in sublime (build option), so whenever i touch the dep tree i just press Cmd+b and the deps file is updated before i switch windows to my browser...

@ostronom
Copy link

I've made a new grunt-file with your closure-oriented tasks, which:

  1. assembles all js and stuff to .tmp directory
  2. runs deps on them
  3. makes a symlink (grunt-contrib-symlink or smth) of closure-library to .tmp/.../closure-library
  4. and serves the app from .tmp

This gives a possiblity to develop not only in js, but in coffee/livescript/etc and to do a deps-run on change of .tmp/*.js to recalculate dependencies.

I will share a gruntfile via gist when i'll be sure that everything works (if you want).

P.S. I can't file an issue about livereload breakage, because i don't know how to fix it :) So it's probably not a bug of this software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants