-
Notifications
You must be signed in to change notification settings - Fork 140
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
tried to implement appcache mechanism.. needs some work for dev vs prod #388
Conversation
didn't realize there was a grunt-mxmlc. that would've been a lot easier to set up - thank you! I'd like to read more about appcache before merging this - kind of worried that it'll interfere with updates, if version.json's cached or something. Doesn't look like this can be hidden behind a debug-flag, unfortunately. |
yeah .. no i wasnts expectign you to merge this as it it.. mayeb i shoudl have just posted a link to my branch instead of a pull request. it was more so you could see what i've done.. and pinch bits like the grunt-mxmlc if you thought that was better. FYI a few things i discovered tring to get eth flash to compile..
according to the various doco.. the offline cache gets checked everytime the manifest file changes. you can register a callback the get notified of changed.. so you can put up a 'a new version is available.. please update' message links: this has a good example i mnigth pinch. and 2 angular appache thingys. migth be the best way to go |
okay.. im actually mostly happy with this now.. description off offline changes: in debug it chekc every 10 seconds.. otherwise it checks the cache for updates every 30seconds. you can kind of control if its active or not. |
i just changed it so this is now only on in debug mode.. the only catch is if you turn debug mode off.. you need to remove teh manifest.appcache file NB: |
Just letting you know I haven't forgotten about this or your other pull request, have just been focused elsewhere - will get to this soon, sorry for the delay. |
Merging this with a new Hiding the loader in an iframe to make it prod/dev-toggleable is a nice trick. :) I still haven't done the research/testing I need to be confident turning this on in prod - created #469. |
}, | ||
prod: { | ||
files:{ | ||
'./.tmp/storage.swf' : ['./jsflash/prod/Storage.as'] |
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.
prod built to ./dist
before this change, not to ./.tmp
. would've broken saved games for lots of kongregate users if I didn't catch this; careful!
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.
okay.. i'm still not entirely clear on the whole dist vs .tmp thing works.. im still learning about grunt/bower/npm etc...
i'll try and be more careful if i make more build related changes..
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.
quick explanation: grunt serve
compiles to and serves stuff from .tmp. The production distribution is a copy of everything in the dist folder after running grunt build
, which includes some (but not all) things copied from .tmp.
This setup comes from generator-angular
, I didn't write it: https://github.com/yeoman/generator-angular
start of offline feature for #150
also fixed grunt to use grunt-mxmlc for swf compiling.. needed to add npm packages also.
other npm packages updted at the same time.
did get 1 error in app/scripts/services/statistics.coffee which may or may not be related. (session object did not exist)
have a look and see what you think.