Displaying 1 to 18 from 18 results

babel-plugin-preval - Pre-evaluate code at build-time

  •    Javascript

You need to do some dynamic stuff, but don't want to do it at runtime. Or maybe you want to do stuff like read the filesystem to get a list of files and you can't do that in the browser.There's also preval.require('./something') and import x from /* preval */ './something' (which can both take some arguments) or add // @preval comment at the top of a file.

babel-plugin-codegen - 💥 Generate code at build-time

  •    Javascript

The applications of this plugin are wide, so it's kinda hard to sum it up, but basically my use case was I needed to add a bunch of named exports to glamorous (one for every DOM node type) and I didn't want to maintain the exports in my source file. So someone created a post-build script to concatenate them to the end of the file. I built this plugin so I could do that without having an ad-hoc post-build script.This plugin allows you to generate code at build-time. Any code that runs synchronously in node can be used to generate a string of code and that string will be inserted in place of where your usage appears.

import-all.macro - A babel-macro that allows you to import all files that match a glob

  •    Javascript

You want to import all files that match a glob without having to import them individually.This is a babel-plugin-macro which allows you to import files that match a glob. It supports import statements for synchronous resolution as well as dynamic import() for deferred resolution (for code splitting with react router for example).

raw.macro - Read file contents at build time via babel-plugin-macros, similar to webpack raw-loader

  •    Javascript

I came across a few problem when using raw-loader in create-react-app. This can also be useful in environment where webpack is not available / not extensible. Just use babel and you're good to go.




codegen.macro

  •    Javascript

This is a babel-plugin-macros macro for babel-plugin-codegen. Please see those projects for more information.

babel-blade - a Babel plugin/macro that solves the Double Declaration problem in GraphQL

  •    HTML

babel-blade is the collective name for the babel plugin/macro that helps to generate graphql query strings inline and solves the double declaration problem.

idx.macro - a 'babel-macros' version of 'babel-plugin-idx'

  •    Javascript

This is a babel-macros version of the babel plugin idx. idx is a utility function for traversing properties on objects and arrays.

param

  •    Javascript

param.macro provides two main symbols — it and _. it can be used in an expression passed to a function which implicitly creates a lambda function in place accepting a single argument.


graphql.macro - Compile GraphQL AST at build-time with babel-plugin-macros.

  •    Javascript

Compile GraphQL AST at build-time with babel-plugin-macros.

graphql.macro-example

  •    Javascript

This is a graphql.macro example with Create React App @next.

svgr.macro - Run svgr at build-time with babel-plugin-macros.

  •    Javascript

Run svgr at build-time with babel-plugin-macros. The macro solution is not suggested for every use case. If you import the same svg across multiple files, it will inflate the bundle size.

data-uri.macro - 🎣 Convert files to data-uris at build time.

  •    Javascript

Convert your assets to data URIs at build time with babel macros.

regexgen.macro - 🎣 Convert your set of strings to optimized RegExps at build time.

  •    Javascript

Convert your set of strings to optimized RegExps at build time with babel macros.

assign

  •    Javascript

A babel-macro to transpile `Object.assign`-style expressions to direct assignments for maximum performance.

babel-plugin-glamorous-displayname - A babel plugin for Glamorous displayNames 💄

  •    Javascript

You want to use glamorous, but you want to have a better experience with the DevTools (because you lose the automatic displayName magic that the react babel preset gives you). Adds the displayName to glamorous components.

animated.macro - A tiny language for arithmetic over React Native's Animated values. 🕺🏽🔢

  •    Javascript

A tiny language for arithmetic over React Native's Animated values. For the best experience, install and configure babel-plugin-macros if you haven't already. Alternatively, this package also exports a standalone Babel plugin for use with Babel 6 or 7, under the name animated.macro/plugin.

css-to-rn.macro - Convert CSS to React Native style sheet at build time with babel macros

  •    Javascript

Convert CSS to React Native style sheet at build time with babel macros, using css-to-react-native-transform. You'll also need to install and configure babel-plugin-macros if you haven't already.

babel-plugin-console - Babel Plugin that adds useful build time console functions 🎮

  •    Javascript

These problems can be solved by a computer at build time. This plugin allows you to inspect a functions parameters, variables, return value and parent scope by adding meaningful logs around the scope of the function - removing the hassle of manual console.log statements or debugging. obj1 ... objN A list of JavaScript objects to output. The string representations of each of these objects are appended together in the order listed and output.