问题描述
我正在尝试sencha 6.5,我已经使用
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.
根据 sencha指南,软件包的结构应如下结构,
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
推荐答案
Sencha CMD不会生成docx中提到的工具箱文件夹,并且没有任何选择,只有我们可以提及主题包的工具箱类型.因此我们需要手动创建类似于通用应用程序(经典和现代)的文件夹,并使用路径$ {toolkit.name}来更新package.json,如下所示
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"
],
这篇关于Sencha 6.5,其中经典和现代文件夹同时创建新程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!