mardi 9 décembre 2014

Production Build not injecting css after platform one in app.json

Hi

Sencha Cmd v5.0.3.324

Sencha Touch 2.4.1

IOS and Android devices, emulator under google chrome.


The issue i am seeing is that the CSS file defined after the one with a platform is not being injected the first time you load the app up, and your cache is cleared. If you refresh the app in the browser, then it will inject the missing css. If i remove the platform from the definition, then it injects all three. I also did a test to add a 4th css file at the end , and it was not injected as well, so it appears that when it gets to the one with the Platform defined, its not injecting any of the other below on the first load.


I can reproduce this consistently, and it only happens with the production build (sencha app build production), the testing build (sencha app build testing) has no issue, all css gets injected properly then.


Has anyone else encouted this issue.


app.json css section (rest is the default from a newly generated app)




"css": [

{

"path": "resources/css/app.css",

"update": "delta"

},

{

"path": "touch/resources/css/bb10.css",

"platform": ["blackberry"],

"theme": "Blackberry",

"update": "delta"

},

{

"path": "resources/css/test.css",

"update": "delta"

}

],





Clarification/steps to reproduce:

1. sencha -sdk ~/temp/Mobile/touch-2.4.1 generate app csmobile .

2. create a test.css and add .x-title .x-innerhtml {color: red;}

3. Modify app.json to have a css section as follows:

"css": [

{

"path": "resources/css/app.css",

"update": "delta"

},

{

"path": "touch/resources/css/bb10.css",

"platform": ["blackberry"],

"theme": "Blackberry",

"update": "delta"

},

{

"path": "resources/css/test.css",

"update": "delta"

}

],


4. sencha app refresh

5. sench app build production

6. Deploy app to how ever you test in your environment

7. Pull up google chrome or an iphone/android device.

8. Clear cache (Clear everything for all time)

9. For chrome hit f12 to go into developer tools and select iphone 5 as the device.

10. Launch app

11. Notice title is not red and you can see the css not injected

12. Refresh app, title turns red and you can see the css is injected.






Production Build not injecting css after platform one in app.json

Aucun commentaire:

Enregistrer un commentaire