Giter Club home page Giter Club logo

xbdj-mp's Introduction

xbdj-mp

鲜宝到家小程序

安装 MPX

  1. 在已有文件夹内创建mpx工程:(当前文件夹名就是项目名)
mpx init .
  1. 启动服务,mpx会将源码编译成小程序识别的代码,并监听文件变化进行重编译
npm install
npm run watch
  1. 配置小程序根目录,在project.config添加配置
"setting": {
  "urlCheck": false,
  "es6": true,
  "postcss": true,
  "minified": true,
  "newFeature": true,
  "nodeModules": true,
  "autoAudits": false,
  "uglifyFileName": true,
  "checkInvalidKey": true
},
  1. 用小程序 IDE 打开dist项目目录

安装 sass-loader

npm install sass-loader node-sass --save-dev

安装 Vant

  1. 在项目目录下正常安装 vant-weapp

MPX 中使用第三方包,不需要构建 npmMPX 会自动检查你使用的 npm 包,并按需编译到 dist 目录中。

npm i vant-weapp -S
  1. 引用组件
"usingComponents": {
  "van-button": "vant-weapp/dist/button"
}

xbdj-mp's People

Contributors

dzzzh avatar guozhiqing avatar li-kang avatar yaofeng19940604 avatar zxywudishuai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.