• Stars
    star
    311
  • Rank 134,521 (Top 3 %)
  • Language
    JavaScript
  • Created over 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easy 🐏 modular builds

babel-plugin-ramda Build Status

This plugin is a transform to remove unused ramda dependencies, without forcing the user to cherry pick methods manually. This lets you use ramda naturally (aka as documented) without worrying about bundling parts you're not using.

See also babel-plugin-lodash.

Example

Converts

import R, {map} from 'ramda';

map(R.add(1), [1, 2, 3]);

Roughly to

import add from 'ramda/src/add';
import map from 'ramda/src/map';

map(add(1), [1, 2, 3]);

Limitations

  • You must be using ES6 imports (both specifiers and default work) to load ramda.

FAQ

I receive TypeError: The plugin "ramda" didn’t export a Plugin instance
or, can I use this plugin with Babel v5?

Babel v5 is no longer supported. Use v0.1.2 for support.

Usage

Via .babelrc (Recommended)
{
  "plugins": ["ramda"]
}

or

{
  "plugins": [
    ["ramda", {
      "useES": true
    }]
  ]
}

to use the new ramda/es/ path for imports, which is available since Ramda 0.25. This is recommended as it uses ES modules rather than CommonJS. It defaults to ramda/src/ when omitted.

Via CLI
$ babel --plugins ramda script.js
Via Node API
require("babel-core").transform("code", {
  plugins: ["ramda"]
});

More Repositories

1

MutationObserver.js

ES3 Shim for the MutationObserver interface via DOM diffing.
JavaScript
334
star
2

lodash-modularize

Generate modular lodash builds through static analysis.
JavaScript
40
star
3

lodash-decorators

A set of ES7 decorators from lodash
JavaScript
30
star
4

qwebirc-enhancements

Rich and intuitive browser IRC client.
JavaScript
22
star
5

Summarize.me

A JSON templated resume that includes a summary of notable Github activity
HTML
17
star
6

RingBuffer.nim

Circular buffer implementation in Nim
Nim
10
star
7

SemVish

Jack-of-all version parsers and interpretters 🏤
JavaScript
5
star
8

acorn-umd

Parse acorn ast for AMD, CommonJS, and ES6 definitions.
JavaScript
4
star
9

stream-fusion

Versatile stream data fusion for node
JavaScript
3
star
10

csv-chunk

Split a CSV file into chunks of n rows
JavaScript
3
star
11

irc-style-parser

Parse IRC flavoured messages with colours and styles (as compliantly as possible)
JavaScript
3
star
12

csv-concat

Merge a bunch of CSV files in a folder
JavaScript
2
star
13

cdn-it

Create autoupdating jsDelivr configurations in seconds
Python
2
star
14

tfstreams

tf2 stream list chrome extension
JavaScript
2
star
15

generator-babel-node

Generator for es6-node-boilerplate.
JavaScript
2
star
16

qwebirc-node

Qwebirc server using node and socket.io
JavaScript
1
star
17

pbm-formatter

Port of https://github.com/paulcuth/netpbm-viewer
JavaScript
1
star
18

es-lookup-scope

Lookup the scope of an estree compatible node
JavaScript
1
star
19

antd-form-issue

http://stackoverflow.com/questions/43286302/
JavaScript
1
star
20

ros-backbone

roslib->backbone bindings
JavaScript
1
star