Git Product home page Git Product logo

wechat_pay_apr-may_campaign_lucky_draw's Introduction

使用方式

  1. 初始项目:npm run install
  2. 开发模式:npm run start
  3. 发布模式:npm run build

目录结构

src:此目录一般给前端开发人员使用,存放需要被转换或打包的代码(js、css、scss、img等)。 其中图片、字体等在js中使用的资源文件最终会被打包到diststatic目录下。

static:存放静态、不需打包和转换的文件(css、img、js等)。此目录内会被直接copy至dist,可在index.html中直接引入并使用。

资源最终会在dist目录下的staic目录中合并。


文件作用

index.html:模板文件。最终打包至dist,可直接使用引入static中的js、css、img等资源文件。

main.js:打包入口文件,已配置jquery给全局变量$/jquery

(参考src/js/index.jsstatic/lib/test.js)。

如有使用其它lib或初始功能,可将代码放入此处。


include模板

支持在index.html中引入其它静态页面片段。
参考index.html中的footer.html的使用方式

<%= require('html-loader!./footer.html')%>    

注意事项

项目中已添加postcss-pixel-to-viewport用以作为移动端自适应,如需要px自动转换为vmin单位,将代样式表文件放入src内,并在入口文件(main.jsscss/index.scss)内import

默认配置设计稿宽度414px

使用方式1:1。

例:414宽度设计稿上100pxcss/scss代码中也是100px

index.html中直接使用内联样式单位px,无法转换。

wechat_pay_apr-may_campaign_lucky_draw's People

Contributors

ghostswu avatar

Watchers

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