初试Ext JS 6.6的NPM版(一)
从Ext JS 6.6开始,Ext JS也支持使用nmp来进行辅助开发了。为什么要选择nmp来辅助开发呢?之前使用Sencha Cmd也挺好的。Cmd确实也不错,但唯一的缺点就是不能确定最新版的Cmd是否适合适合你现在项目的版本,笔者一直在用Ext JS 6.2的GPL版本,也一直没去升级Cmd的版本,就是为了避免出问题。使用nmp可以减少这样的麻烦,而且使用npm来进行辅助开发是目前的发展潮流,为了跟上潮流,也应该尝试一下,说不定会喜欢上这种开发模式。
在使用前先根据《Getting Started with Ext JS Open Tooling》里的说明安装好ext-get
。安装好ext-gen
以后,在命令提示符窗口输入ext-gen --help
来查看一下创建应用程序的方式,命令执行后会显示如下输出:
Sencha ExtGen v0.0.194 - The Ext JS code generatorQuick Start: ext-gen -aext-gen app (-h) (-d) (-i) (-t 'template') (-m 'moderntheme') (-c 'classictheme') (-n 'name') (-f 'folder')-h --help show help (no parameters also shows help)
-d --defaults show defaults for package.json
-i --interactive run in interactive mode (question prompts will display)
-t --template name for Ext JS template used for generate
-c --classictheme theme name for Ext JS classic toolkit
-m --moderntheme theme name for Ext JS modern toolkit
-n --name name for Ext JS generated app
-f --folder folder name for Ext JS application (not implemented yet)
-v --verbose verbose npm messages (for problems only)Examples:
ext-gen app --template universalclassicmodern --classictheme theme-graphite --moderntheme theme-material --name CoolUniversalApp
ext-gen app--template classicdesktop --classictheme theme-graphite --name CoolDesktopApp
ext-gen app --interactive
ext-gen app -a --classictheme theme-graphite -n ClassicApp
ext-gen app -a -t moderndesktop -n ModernAppTemplates:
You can select from 4 Ext JS templates provided by Sencha ExtGenclassicdesktop (default)
This template is the default template in ext-gen. It contains 1 profile, configured to use the classic toolkit of Ext JS for a desktop applicationmoderndesktop
This template is similar to the classicdesktop template. It contains 1 profile, configured to use the modern toolkit of Ext JS for a desktop applicationuniversalclassicmodern
This template contains 2 profiles, 1 for desktop (using the classic toolkit), and 1 for mobile (using the modern toolkit)universalmodern
This template contains 2 profiles, 1 for desktop and 1 for mobile. Both profiles use the modern toolkit.Theme Names:
classic themes: theme-classic, theme-neptune, theme-neptune-touch, theme-crisp, theme-crisp-touch theme-triton, theme-graphite
modern themes: theme-material, theme-ios, theme-neptune, theme-triton
在帮助信息的Examples
一节,我们可以看到生成通用应用程序、经典桌面应用程序、交互模式、使用石墨主题的经典应用程序和现代桌面应用程序等5个示例代码。
笔者要尝试的是经典桌面应用程序,还是使用海卫一主题,那个石墨主题的色调要自己重新调,还是算了。在命令行中输入以下命令来创建应用程序:
ext-gen app -c theme-triton -n Admin
由于经典模版是默认模版,因而不需要去指定模版,在命令中只需要指定主题和项目名称就可以的了。比较遗憾的是f选项居然还没实现,不能指定文件夹。
等待创建操作完成后,会在命令行窗口看到以下输出:
type "cd admin" then "npm start" or "npm run desktop"
to run the development build and open your new application in a web browser
根据提示先执行命令cd admin
进入项目文件夹,然后执行npm start
或npm run desktop
命令在浏览器打开应用程序了,可看到如下图所示的效果。
从图中可以看到,Ext JS 6.6提供了一个新的应用程序模版,看还去还好,不过不是笔者想要的,还是修改回管理模版比较好。
今天先到这了。
初试Ext JS 6.6的NPM版(一)相关推荐
- 《深入浅出Ext JS》(第2版)即将上市
<深入浅出Ext JS>(第2版)将于5月初上市.在此非常感谢各位购买和阅读本书第1版的广大读者,感谢大家对本书的关注,及阅读后给予本书的中肯评论.同时感谢,本书改版之前,积极参与图灵组织 ...
- [Ext JS]5.11 轻量版的树- treelist
treelist, Ext.list.Tree 是一种轻量的用于显示树形结构的组件. Ext.list.Tree 的继承关系 Ext.list.Tree 继承自 Ext.Gadget, Gadget的 ...
- [Ext JS 7]基于NPM的开发
文章目录 NPM是什么? Ext JS对NPM的支持 1. 申请试用账号 2.使用账号.密码登录 3. 安装应用生成器(命令行:ext-gen) 4. 使用ext-gen创建项目 ext-gen 完整 ...
- Ext JS 4倒计时:开发者预览版
作为Ext JS团队的代表,我很高兴地宣布第一个Ext JS 4开发者预览版 发布了.Ext JS 4是到目前为止,我们所做的改动最大,有史以来最先进的Javascript框架.从生成HTML代码到类 ...
- 【翻译】Ext JS 7早期访问版
原文:Ext JS 7.0 Early Access Ext JS 7.0早期访问版已经发布了.该办法包含了许多增强功能和令人兴奋的新功能,而其中的重点是增强现代工具包.想了解更多与此版本有关的信息, ...
- Ext JS的4.1.0的RC 1的发行说明
Ext JS的 - JavaScript框架 Ext JS的4.1.0的RC 1的发行说明 发行日期:2012年3月13, 版本号:4.1.0的RC 1 修正的错误 钮 EXTJSIV-5129 按钮 ...
- 【翻译】Ext JS 6.6.0的新东西
原文:<What's New in Ext JS 6.6.0> 简介 Sencha Ext JS 6.6已经支持NPM包和开放工具.Ext JS 6.6现在可以通过NPM包让开发人员使用已 ...
- 【翻译】Ext JS社区版
原文地址:https://www.sencha.com/products/extjs/communityedition/?utm_source=snceb&utm_medium=email&a ...
- Ext JS 6正式版的GPL版本下载地址
下面是Ext JS 6正式版的GPL版本下载地址 https://www.sencha.com/legal/gpl/ 转载于:https://blog.51cto.com/dqhuang/167041 ...
最新文章
- Lesson 6.1 身份证识别: 提取字段
- 在c语言中下面指针,c语言指针的知识点
- gitignore.io-程序猿值得拥有的智能生成gitignore文件的秘密武器
- 安全研究员发现 Yandex 浏览器中的 SSRF 缺陷
- android跑马灯源码,Android跑马灯的简单实现方式
- 苹果手机投屏到电脑大屏幕上的方法
- SQL 排序,筛选,过滤,聚合函数
- 编写广告系统的测试用例
- Cisco ASA 9.16(Adaptive Security Appliance (ASA) Software)
- 实验室主机Ubuntu远程控制+自动开关机
- 多线程总结--小码哥java
- Google 辟谣,Android 和 Chrome OS 不合并 - Andromeda
- Datatables表格插件学习
- String的xml转map
- 同为标准版 OPPO Reno7和华为nova9怎么选,这几点要搞清楚
- pla3d打印材料密度_3D打印材料:PLA (聚乳酸)材料
- Linux实训项目二 用户和组的管理
- Pcap数据包资源下载汇总-恶意威胁流量
- JSP基础知识总结一
- POI之Word转化为Markdown-yellowcong