Coder Social home page Coder Social logo

mini-collection's Introduction

mini-collection

前端资源优化整合, 包含css压缩,js压缩,图片压缩

使用方式

传统方法

  1. 安装mini-collection
npm install mini-collection --save-dev / yarn add mini-collection -D / pnpm add mini-collection -D
  1. 初始化配置文件
npx mini init

将在运行目录下生成一个mini.config.js配置文件

  1. 按需修改配置文件

  2. 编译并监听文件夹

npx mini start

使用脚本

{
 "scripts": {
  "mini:start": "mini init && mini start -s static_dev -t static_dist"
 }
}

在程序中使用

const mini  = require("mini-collection")
const config = require("mini.config.js") // your vno config
mini(config)
 .then(() => {
  console.log("编译完成,开始监听文件夹")
 })
 .catch(err => {
  console.error(err)
 })

从1.0.10开始不再支持image压缩

获取帮助

npx mini --help
npx mini init --help
npx mini start --help

mini-collection's People

Stargazers

 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.