Coder Social home page Coder Social logo

gulp_wechat_cli's Introduction

Gulp 开发微信小程序

  • 使用 sass 开发 wxss
  • 支持 px2rpx(将px转换成rpx, 1px = 2rpx)
  • 支持es6/7 开发 js(es6 代码可转换成es5)

项目目录结构

[ 
     |-- gulpfile.js', //gulp打包工具配置文件
     |-- package.json', //项目依赖环境
     |-- README.md',
     |-- client', //小程序开发环境,写代码的文件
     |   |-- app.js', //小程序逻辑 程序入口
     |   |-- app.json', //小程序公共配置
     |   |-- app.scss', //小程序公共样式表
     |   |-- project.config.json', // 小程序项目配置
     |   |-- filter', //自定义的 过滤器
     |   |   |-- filter.wxs',
     |   |-- img', // 图片资源
     |   |   |-- wave_two.png',
     |   |-- lib', 
     |   |   |-- API.js', // API文件 后台接口统一存放
     |   |-- pages',
     |   |   |-- index',
     |   |   |   |-- index.js',
     |   |   |   |-- index.json',
     |   |   |   |-- index.scss',
     |   |   |   |-- index.wxml',
     |   |   |-- logs',
     |   |       |-- logs.js',
     |   |       |-- logs.json',
     |   |       |-- logs.scss',
     |   |       |-- logs.wxml',
     |   |-- utils',
     |       |-- util.js',
     |-- dist' //生产环境,开发环境生成的文件
   ]

使用

想了解gulp,请移步  https://www.gulpjs.com.cn/docs/getting-started/
# 安装项目依赖
npm install

# 启动 gulp 编译 client 文件夹,会自动生成dist文件夹(编译的时候可能会报错,将dist整个文件删除,重新编译即可)
npm run dev

# 上线打包
npm run build

gulp_wechat_cli's People

Contributors

ityadong 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.