飞冰快速入门

2021-04-16  本文已影响0人  明训

背景说明

项目前端需要使用飞冰开发框架进行开发,这里针对个人学习情况做备忘

官网地址

https://ice.work/

https://github.com/alibaba/ice/blob/master/README_zh-CN.md

官网介绍

让前端开发简单而友好

GUI工具

Iceworks(飞冰 GUI)是一款非常好用且功能强大的图形化界面的开发平台,它承载了ICE的物料体系和开发体验

软件介绍

https://ice.work/docs/iceworks/more/upgrade-guidelines

软件安装

推荐使用Iceworks 4.0,支持VSCode,官网安装文档https://ice.work/docs/guide/gui-start

https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks

项目创建

参考文档:https://ice.work/docs/guide/cli-start

D:\11>npm init ice myapp
npx: installed 143 in 9.817s
create-ice version: 1.7.4
create-ice args myapp undefined
? Please select a template Simple TypeScript template.
download tarballURL https://registry.npm.taobao.org/@alifd/scaffold-simple/download/@alifd/scaffold-simple-0.2.4.tgz
√ download npm tarball successfully.
clean package.json...
Initialize project successfully.
Starts the development server.
    cd myapp
    npm install
    npm start
We have prepared develop toolkit for you.
See: https://marketplace.visualstudio.com/items?itemName=iceworks-team.iceworks

项目运行

D:\11>cd myapp
D:\11\myapp>npm install
D:\11\myapp>npm start

此时打开浏览器访问:http://localhost:3333/ 即可看到页面

端口修改

方案一

打开命令行窗口依次执行如下命令

D:\11\myapp>set PORT=8081
D:\11\myapp>npm start   

类Unix系统修改为:export PORT=8081

方案二

找到package.json文件,找到scripts配置节,修改

"start": "icejs start"

"start": "set port=8081 && icejs start"

保存文件并再次执行npm start即可

类Unix系统修改为:"start": "PORT=8081 && icejs start"

上一篇下一篇

猜你喜欢

热点阅读