Giter VIP home page Giter VIP logo

ucompress's Introduction

webreflection

WebReflection Ltd

ucompress's People

Contributors

webreflection avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ucompress's Issues

Source Maps

The --no-mifiy flag works great, but when the code is minified, it would be awesome to have at least JavaScript files with a source map, so that debugging would become much easier.

TODO

Add a --source-map flag and save one in the destination folder without bothering with compression and the rest (at least as first implementation).

Add import-map resolver

Thanks for this project !

I am doing a tool that build some files into a build folder and expose a import-map.json that is used to tell the browser to match some imports in the source code to the built files. See here for more information: https://github.com/nestarz/esdev

The thing is I can't use your tool with it because it doesn't use import maps like the browser do to resolve imports.

Do you think it can be added easily ? Or if there is a workaround to it ?

ucompress as global dep

If you globally install ucompress, then you cannot require it, at least with git bash on Windows.
This is a nuance for any global package, not only ucompress.

To fix it : export NODE_PATH=$APPDATA/npm/node_modules

$ npm i -g ucompress
[cut]
+ [email protected]
updated 1 package in 19.948s
$ node
Welcome to Node.js v12.16.3.
Type ".help" for more information.
> const ucompress = require('ucompress');
Uncaught Error: Cannot find module 'ucompress'
Require stack:
- <repl>
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '<repl>' ]
}
>
(To exit, press ^C again or ^D or type .exit)
>
$ npm ls -g ucompress
C:\Users\[cut]\AppData\Roaming\npm
`-- [email protected]

$ export NODE_PATH=$APPDATA/npm/node_modules
$ node
Welcome to Node.js v12.16.3.
Type ".help" for more information.
> const ucompress = require('ucompress');
undefined
>

Just a reminder for casual developer as me, when you read README section As binary file, you use the command line and then you want using the dep for a quick snippet.

HTML literals minification with source map

It'd be great to combine HTML literals minification within terser, but so far I couldn't find a way to combine both approaches into one (due source map).

Any hint/help appreciated.

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.