country_dev
country_dev

Reputation: 605

Extjs 6 - Custom theme package error

I'm having issues requiring a custom theme package in my extjs 6 application. I created a custom theme package that extends the Triton theme, built the package and added the .pkg to the local repository. I then added the package to the requires block in my app's app.json file and ran sencha app refresh -packages. I am then presented with the following error:

rook$ sencha app refresh -packages
Sencha Cmd v6.0.2.14
[INF] Processing Build Descriptor : classic
[INF] Refreshing packages for build : classic
[ERR] Cannot satisfy requirements for "theme-neptune"!
[ERR]    The following versions cannot be satisfied:
[ERR]       new-test-theme: theme-neptune (No matches!)
[ERR] Cannot resolve package requirements

Here is my package.json file for my custom theme package:

{
    "name": "new-test-theme",
    "namespace": "New.test.theme",
    "type": "theme",
    "extend": "theme-triton",
    "toolkit": "classic",
    "creator": "pr-repo",
    "summary": "Short summary",
    "detailedDescription": "Long description of package",
    "version": "1.0.1",
    "compatVersion": "1.0.0",
    "format": "1",
    "slicer": {
        "js": [
            {
                "path": "${package.dir}/sass/example/custom.js",
                "isWidgetManifest": true
            }
        ]
    },
    "output": "${package.dir}/build",
    "local": true,
    "sass" : {
        "namespace": "New.test.theme",
        "etc": "${package.dir}/sass/etc/all.scss,${package.dir}/${toolkit.name}/sass/etc/all.scss",
        "var": "${package.dir}/sass/var,${package.dir}/${toolkit.name}/sass/var",
        "src": "${package.dir}/sass/src,${package.dir}/${toolkit.name}/sass/src"
    },
    "classpath": "${package.dir}/src,${package.dir}/${toolkit.name}/src",

    "overrides": "${package.dir}/overrides,${package.dir}/${toolkit.name}/overrides",

    "example": {
        "path": [
            "${package.dir}/examples"
        ]
    },

    "framework": "ext",

    "requires": [
    ]
}

And then in my applications app.json file I am requiring the package:

"requires": [
        "font-awesome",
        "new-test-theme"
    ],

I am running: Sencha Cmd v6.0.2.14 and ext-6.0.1

Can anyone see whats causing this error?

Upvotes: 3

Views: 4425

Answers (1)

CD..
CD..

Reputation: 74156

I think you need to set the theme property instead of adding it to your requires property.

Should look like:

"builds": {
    "classic": {
        "toolkit": "classic",
        "theme": "new-test-theme"
    },

    "modern": {
        "toolkit": "modern",
        "theme": "new-test-theme"
    }
}

Upvotes: 3

Related Questions