Giter Site home page Giter Site logo

unusewxss's Introduction

unusewxss

在微信小程序开发中经过多个版本的迭代之后,wxss中就会出现很多没有使用过的样式一直没有删除,在体验检查的时候微信开发者工具就会提示哪个wxss文件可以精减节省小程序包的大小加快小程序的加载进度 开发者工具提示

unusewxss用于快速查找微信小程序页面中wxss中声明的类样式在wxml中未使用的样式类,协助微信小程序删除多余无用的样式

Installation

git clone https://github.com/momobeizi/unusewxss.git

npm install

Examples

 // 编辑index.js中的wxssPath,wxssPath路径
 // 注意/**/*.wxss不需要修改,只修改前面的文件路径

 const wxssPath = 'E:/xxxx/wx-xxx/pages/**/*.wxss'; // wxss文件的路径
 const wxmlPath = 'E:/xxxx/wx-xxx/pages/**/*.wxml'; // wxml文件的路径
 
 // 执行
 node index.js

Output

第1个没有使用的类名: test  所在目录: E:\xxxx\wx-xxx\pages\xxxxx\index.wxss
第2个没有使用的类名: name  所在目录: E:\xxxx\wx-xxx\pages\xxxxx\index.wxss

unusewxss's People

Contributors

momobeizi avatar

Stargazers

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