0

I have updated my Sencha CMD version to the lastest version 6, I have seen a new implementation with a new object called "sass" in the app.json and my question is.. How to configure correctly this area? I am working with packages in my app and in this new concept of app.json and newer version of the command line I guess is possible to add a watcher in the different sass folder..

Can you help me with the implementation and correct paths to the packages in the app .json?

Here you can see a first approach:

https://docs.sencha.com/extjs/6.0/whats_new/6.0.0/cmd_upgrade_guide.html

Concretely in the area of the app.json.

inane
  • 626
  • 10
  • 26

1 Answers1

1

Here is what it can look like. You'll have to find the correct pathes for your packages yourself.

    /**
     * Comma-separated list of files or folders containing extra Sass. These
     * files are automatically included in the Sass compilation. By default this
     * is just "etc/all.scss" to allow import directives to control the order
     * other files are included.
     *
     * All "etc" files are included at the top of the Sass compilation in their
     * dependency order:
     *
     *      +-------+---------+
     *      |       | base    |
     *      | theme +---------+
     *      |       | derived |
     *      +-------+---------+
     *      | packages        |  (in package dependency order)
     *      +-----------------+
     *      | application     |
     *      +-----------------+
     */
    "etc": [
        "sass/etc/all.scss",
        "${toolkit.name}/sass/etc/all.scss",
        "../ext/packages/ux/classic/sass/var/layout/ResponsiveColumn.scss"
    ],

    /**
     * Comma-separated list of folders containing Sass variable definitions
     * files. These file can also define Sass mixins for use by components.
     *
     * All "var" files are included after "etc" files in the Sass compilation in
     * dependency order:
     *
     *      +-------+---------+
     *      |       | base    |
     *      | theme +---------+
     *      |       | derived |
     *      +-------+---------+
     *      | packages        |  (in package dependency order)
     *      +-----------------+
     *      | application     |
     *      +-----------------+
     *
     * The "sass/var/all.scss" file is always included at the start of the var
     * block before any files associated with JavaScript classes.
     */
    "var": [
        "sass/var/all.scss",
        "sass/var",
        "${toolkit.name}/sass/var"
    ],

    /**
     * Comma-separated list of folders containing Sass rule files.
     *
     * All "src" files are included after "var" files in the Sass compilation in
     * dependency order (the same order as "etc"):
     *
     *      +-------+---------+
     *      |       | base    |
     *      | theme +---------+
     *      |       | derived |
     *      +-------+---------+
     *      | packages        |  (in package dependency order)
     *      +-----------------+
     *      | application     |
     *      +-----------------+
     */
    "src": [
        "sass/src",
        "${toolkit.name}/sass/src"
    ]
},
Forivin
  • 14,780
  • 27
  • 106
  • 199
  • Thank you for your response, than I should add this code to the app.json or into the package.json of each package ? – inane Oct 08 '15 at 08:12
  • Yes it goes into the app.json under "sass". I highly advice you to generate the official example app and inspect it: https://docs.sencha.com/extjs/6.0/getting_started/getting_started.html – Forivin Oct 08 '15 at 08:25
  • Sorry, I don´t get it, I have only one app.json in the root.. Should I to add in this file or in the package.json? – inane Oct 08 '15 at 10:39
  • It goes into the app.json file in your projects root directory. And again, you should really build the example app and just take a look at it. It comes with a complete app.json and everything. All you need to do is run `sencha -sdk /path/to/extjs/framework generate app MyApp MyApp`... – Forivin Oct 08 '15 at 10:55
  • but with this method I loose my current code, right? – inane Oct 08 '15 at 11:05
  • No. Just make sure to run the command from a different directory. For example use `cd c:\myProjects\extjs-test` and then run `sencha -sdk c:\downloads\ext-6.0.0 generate app MyApp MyApp`. You will find a completely new generated ext6 app in `c:\myProjects\extjs-test\MyApp` then... – Forivin Oct 08 '15 at 11:26