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

Why not add grunt-rev ? #60

Open
asgeo1 opened this issue Jun 18, 2014 · 4 comments
Open

Why not add grunt-rev ? #60

asgeo1 opened this issue Jun 18, 2014 · 4 comments

Comments

@asgeo1
Copy link

asgeo1 commented Jun 18, 2014

A different cordova generator I used to use included grunt-rev, so the compiled JS/CSS assets in www would be "versioned".

I.e.

rev: {
  dist: {
    files: {
      src: [
        'www/scripts/{,*/}*.js',
        'www/styles/{,*/}*.css'
      ]
    }
  }
},

Running "rev:dist" (rev) task
www/scripts/scripts.js >> cd7e4895.scripts.js
www/scripts/vendor.js >> 7efd94d7.vendor.js
www/styles/main.css >> 7ad65e9e.main.css
www/styles/vendor.css >> 6e45766f.vendor.css

Perhaps add this to this generator?

I have had issues with mobile safari caching assets before, so this is a handy addition.

@JaKXz
Copy link
Contributor

JaKXz commented Jun 18, 2014

+1

@jimthedev
Copy link
Contributor

Never heard of this but it looks really neat. Would you be willing to put in a pull request with this?

@diegonetto
Copy link
Owner

@asgeo1 I had included the grunt-rev plugin as part of this generator during an early phase, but ended up pulling it out because I wasn't sure if it mattered for apps running inside a UIWebView. Mobile Safari is a whole other beast though, and it would definitely make sense adding it for that reason alone, but are you deploying your ionic app to the web?

I was hoping to keep the Gruntfile as short as possible, but if versioning assets does in fact provide a better experience from within the context of a UIWebView, I would be happy to add grunt-rev to the build system.

@diegonetto
Copy link
Owner

Can anyone confirm if versioned assets has any impact on embedded UIWebViews? My gut says it wouldn't but I haven't explored this at any length.

I am willing to add this to the generator if we can proves it alleviates any issues, otherwise there's no point in adding another build system task just for the hell of it.

The only use case I could see for it would be people who were using this generator to build apps meant to be deployed to web servers and used as websites. In that case, yes, this would be necessary, but that's not the focus of this generator.

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

4 participants