Skip to content

Hack to modify Ramda in-place to support Rollup and UglifyJS2 for effective dead code elimination

Notifications You must be signed in to change notification settings

polytypic/ramda-rollup-hack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎉🎉🎉 This project is obsolete as of Ramda ^0.25.0. 🎉🎉🎉

Ramda Rollup Hack · npm version

This is a quick and dirty hack that converts Ramda in-place to support Rollup and UglifyJS2 /*#__PURE__*/ annotations. This allows one to use Ramda with Rollup without having to specify named exports by hand and also makes dead code elimination by UglifyJS2 effective on Ramda.

Usage

Run ramda-rollup-hack after installing Ramda. For example, you could do it in the prepare script of NPM:

{
  // ...
  "scripts": {
    // ...
    "prepare": "ramda-rollup-hack"
  }
}

The ramda-rollup-hack script modifies the package.json file of the Ramda under node_modules to include a "module" entry pointing to ES module copies *.js -> *-es.js of Ramda sources created by the script.

The ramda-rollup-hack script has been designed to be idempotent so that running it multiple times against exactly matching Ramda version should not change anything.

About

Hack to modify Ramda in-place to support Rollup and UglifyJS2 for effective dead code elimination

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published