3

I was trying sencha 6.5, I've created a package using

sencha generate package DemoPkg 

This has created a package for me, but I do not find directories for classic and modern inside it. Did anyone faced this issue? Any suggestion or help on this will be much appreciated.

As per sencha guide the structure of package should have following structure,

packages/
    local/
        foo/                        # Top-level folder for the package
            .sencha/
                package/
                    sencha.cfg      # Sencha Cmd configuration for this package
                    build-impl.xml  # Generated build script for package
                    plugin.xml      # Sencha Cmd plugin for this package
                    codegen.json    # Data to support 3-way merge in code generator
            classic/                # Classic toolkit-specific src code
            examples/               # Example applications demonstrating the package
            licenses/               # License agreement
            modern/                 # Modern toolkit-specific src code
            overrides/              # Folder for automatically activated overrides
            resources/              # Static resources (typically has images folder)
            sass/                   # Container for styling code
                etc/                # General, non-component oriented styling
                example/            # - internal use
                src/                # Style rules named by component
                var/                # Variables and mixins named by component
            src/                    # Folder for normal JavaScript code
            build.xml               # Build script (called by `sencha package build`)
            package.json            # Package descriptor
            Readme.md               # High-level information about this package
Mos Tuor
  • 33
  • 4
  • Isn't a package something to be included into an application? I'm not an expert in extjs but to my understanding a package should be included in the **app.json**. Then you can use any classes that that package has in both modern and classic. – NAmorim Jul 27 '17 at 17:08
  • I guess they just dump a minimal (or at least one that covers only some of the more frequent use cases) package structure using this command. Did you try the structure suggested by the guide? – Mastacheata Jul 28 '17 at 19:31
  • yes I tried, it didn't work for me. The command should generate the full directory as they have mentioned in guide. – Mos Tuor Jul 31 '17 at 12:34
  • Just tried to see if any of the other package types would yield a different structure, but it doesn't. Guess you'll have to manually take care of the right part of your package being loaded then. Got no idea how to do that, though. – Mastacheata Aug 03 '17 at 01:19

1 Answers1

3

Sencha CMD will not generate the toolkit folders as mentioned in the docx and there is no options to do it, only we can mention the toolkit type for theme package. so we need to manually create the folders similar to universal app(both classic & modern) and update the package.json with path ${toolkit.name} like below

"resources": [
    {
      "path": "resources"
    },
    {
      "path": "${toolkit.name}/resources"
    }
],
"sass": {
    "namespace": "UniversalPkg",
    "etc": [
      "${package.dir}/sass/etc/all.scss",
      "${package.dir}/${toolkit.name}/sass/etc/all.scss"
    ],
    "var": [
      "${package.dir}/sass/var/all.scss",
      "${package.dir}/sass/var",
      "${package.dir}/${toolkit.name}/sass/var/all.scss",
      "${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"
],
Gowtham S
  • 923
  • 14
  • 39