使用 Remax 开发微信小程序。
安装依赖
npm install
调试项目
# 执行调试命令
$ npm run dev
or
yarn dev
使用小程序开发者工具打开项目下的 dist
目录
# 执行构建命令
$ npm run build
or
$ yarn build
使用小程序开发者工具打开项目下的 dist
目录,上传代码即可。
$ npm install anna-remax-ui --save
现在我们来看一下 Remax 应用的结构: my-app/ ┳ package.json ┣ remax.config.js ┣ dist/ ┣ node_modules/ ┣ public/ ┣ src/ ┗━┓ app.js ┣ app.css ┣ app.config.js ┣ pages/ ┗━┓ index/ ┣ heart/ ┣ mine/ ┗━┓
dist
为编译后的文件目录。
public
为全局静态资源目录。
src
为源文件目录。
app.js
入口文件。
app.css
全局样式文件。
app.config.js
为小程序全局配置文件,对应 app.json
。
remax.config.js
项目配置