Reputation: 809
The theming guide says to run Sencha Cmd to: - setup the workspace - generate a test app to test the custom theme
The test app created in the theming guide is located inside the workspace folder. My question is, does the app that will use the theme need to be located inside the workspace folder? Or can it reside elsewhere, and it simply uses the built custom theme?
We have an existing app that we now want to use a custom theme, so the app is not inside a workspace. Can I just create the workspace for the custom theme, and make changes for styling necessary to implement the theme? Do I need to make configuration changes in the generated workspace so it is aware of the location of the code for the app which is not in the workspace?
Thanks in advance!
Upvotes: 1
Views: 2179
Reputation: 791
The theme, i.e. .scss
files, eventually converted into a CSS file. You need to include this generated CSS file in your index.html
. This is regardless of how you get or generate the CSS file.
I do not think your existing project need to be inside your new 4.2 theme project. However, it is much easier to test if you are creating a new theme and they reside in the same project.
It is not difficult to put your existing .js
files into 4.2 project. I had to replace the app
directory from the old project and some update to files. You can find the details in the ExtJS upgrade guide.
Upvotes: 1
Reputation: 678
In the new Sencha Architect 3, there's an added feature of Application Styling. See here: http://docs.sencha.com/architect/3/#!/guide/styling
I'm not sure but I think you can import your current ExtJS project into the Architect and start styling your application.
Upvotes: 0
Reputation: 3608
As far as I know, your project, where you wanted to apply the theme, must be generated by Sencha CMD. After generating the project, copy everything from the existing project to the new sencha cmd-generated project.
On the terminal, execute sencha generate theme my-custom-theme
on the application directory. Your my-custom-theme
will be created on the packages
directory of your project folder. In order to use this theme, edit sencha.cfg
found on the [project folder]/.sencha/app/
. Change the app-theme
to app.theme=my-custom-theme
.
In order for the changes to take effect, execute sencha app refresh
.
Upvotes: 1