Coder Social home page Coder Social logo

实现edp minify的命令 about edp HOT 8 CLOSED

ecomfe avatar ecomfe commented on August 15, 2024
实现edp minify的命令

from edp.

Comments (8)

leeight avatar leeight commented on August 15, 2024

@leowang721

from edp.

errorrik avatar errorrik commented on August 15, 2024

json的直接JSON.stringify
js的用util下的compressJavascript方法就行

from edp.

leeight avatar leeight commented on August 15, 2024

我希望能添加更多的配置,默认调用compressJavascript也可以。有时候我希望指定用什么东东来压缩,yui,gcc之类的。

edp minify a.js -o a.compiled.js
edp minify --engine=default a.js -o a.compiled.js
edp minify --engine=gcc a.js -o a.compiled.js
edp minify --engine=yui a.js -o a.compiled.js

同理,cssjson也希望有可选的参数来支持。

from edp.

leeight avatar leeight commented on August 15, 2024

貌似会依赖到 #33

from edp.

errorrik avatar errorrik commented on August 15, 2024

我同意扩展更多minify参数,这是理所应当的。但不建议指定压缩器。理由如下:

  1. 不想安装edp的时候导入其他的jar包
  2. 不想依赖node之外的其他环境
  3. 不想起一个child_process

from edp.

leeight avatar leeight commented on August 15, 2024

我也不想反驳,那就不这么做了。

from edp.

otakustay avatar otakustay commented on August 15, 2024

所以我们的默认压缩引擎是什么,uglify吗?投放端对体积的要求会更严格,采用closure可以在gzip后获得4-7%的何种优势……

from edp.

leowang721 avatar leowang721 commented on August 15, 2024

开搞……

from edp.

Related Issues (20)

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.