In my Extjs app I have kept custom.css file in the resources folder of the root for testing and in the build- resources folder. And add the css path to two both index.html files(test and build). But whenever I make it to convert to build production, index.html file overwrites and custom.css file finds missing. Somewhat problematic it is. I know that this is because I add this file externally. But Is there any permanent solutions to fix this, without violating the Extjs app structure ??
-
i don't think this is an extjs problem. It is just the way you have set up your project... i thinkOliver Watkins– Oliver Watkins2014-08-06 20:22:56 +00:00Commented Aug 6, 2014 at 20:22
-
hi oliver. thanks for the reply.but the question is, where to keep the custom css file in the app? Is there any convention in Extjs to use custom css file?Partha Chowdhury– Partha Chowdhury2014-08-07 07:34:34 +00:00Commented Aug 7, 2014 at 7:34
-
if you chose the way that u only include a css file - then u can store it in the resource folder.JuHwon– JuHwon2014-08-07 10:11:02 +00:00Commented Aug 7, 2014 at 10:11
Add a comment
|
1 Answer
You can add your custom styles via scss. There are several articles around the web about styling your ExtJS app.
http://docs.sencha.com/extjs/5.0.0/core_concepts/theming.html
http://www.rallydev.com/community/engineering/guide-custom-themes-extjs-4 [dead link]
If you only want to add your single custom css file - which i do not recommend - you can do things like that:
Include an existing CSS file in custom extjs theme
http://www.sencha.com/forum/showthread.php?270694-How-to-include-custom-components-CSS-in-build-CSS
2 Comments
Partha Chowdhury
thanks everyone for the reply. ultimately solved the problem with custon css file.but new problem occurs with the custom/external js file. I have kept this file in the resource folder and added it to app.json file. but when i am going to build it to production build fails... I don't know why??
JuHwon
what fails exactly? try to include the custom JS file outside of the <!-- <x-compile> --> ... <!-- </x-compile> --> marks in your index.html file. ( similar to the third link approach with the css ) i would not recommend using the app.json file for this.