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

Better define what "dev" mode does and how it should work #1528

Open
jmathai opened this issue Aug 18, 2014 · 7 comments
Open

Better define what "dev" mode does and how it should work #1528

jmathai opened this issue Aug 18, 2014 · 7 comments

Comments

@jmathai
Copy link
Member

jmathai commented Aug 18, 2014

When setting mode="dev" the static assets (JS/CSS) should reflect the code that exist in the repository and not be pulled from a static asset cache.

However, some of this has changed with #1219 and by adding tbx.js. This issue it to open a discussion about how to most easily work with the assets for a developer.

@hfiguiere
Copy link
Member

As said elsewhere. "dev" is super slow.

In "prod" nothing gets regenerated.

@jmathai
Copy link
Member Author

jmathai commented Aug 18, 2014

In dev it's super slow but the CSS gets regenerated. It's the JavaScript which isn't being regenerated, right?

@hfiguiere
Copy link
Member

yes it is the JS. See PR #1526

@hfiguiere
Copy link
Member

Also bug #1525 is completely related.

@jmathai
Copy link
Member Author

jmathai commented Aug 20, 2014

@hfiguiere To regenerate the JS when mode="prod" you'll have to do a few extra steps. You can do one of the following. Preferably the first because mode="prod" is for functional static assets which we know to be working (final releases, not pre-releases).

  • Delete all generated JS files from /src/html/assets/cache/*.js

Or

  • Increment the mediaVersion value in /src/html/assets/themes/fabrizio1.0/config/setttings.ini

Tip for #878.

@ghost
Copy link

ghost commented Aug 27, 2014

Hi, this doesn't work for me. I think I'm stuck somewhere between older and newer version. When I run in "dev" mode, I have new javascript and CSS, when I switch to "prod" and delete /src/html/assets/cache/*, I have apparently old js, becouse lightbox stops appearing and upload doesn't work. :-/ I have also run the tbx-dot-js.sh with no effect.

Is there a way, by which I can delete all old stuff and get new one to "prod" mode?

@jmathai
Copy link
Member Author

jmathai commented Aug 28, 2014

@xvasek2 did you do these in order?

  1. Delete everything in /src/html/assets/cache/*
  2. Run the tbx-dot-js.sh script
  3. Confirm mode="prod"
  4. Refresh a page through the browser

That should recreate the JS file.

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

2 participants