• This repository has been archived on 18/Jun/2024
  • Stars
    star
    506
  • Rank 86,651 (Top 2 %)
  • Language
  • Created almost 6 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

A collection of awesome babel macros and related resources

Awesome babel macros Awesome

A collection of awesome babel macros and related resources

Contents


Macros

General

Performance and Memory management

File loading

  • lqip.macro: Create LQIP at build-time, similar to webpack's lqip-loader
  • raw.macro: Apply webpack's raw-loader
  • yaml.macro: Load YAML files as pre-parsed objects
  • json.macro: Load JSON files individually or by pattern matching, with special support for package.json, version and tsconfig files.
  • fetch.macro: Allows you to build fetcher function by URL at compile-time.

Object/Array manipulation

  • traph.macro: Transform Objects easily, leveraging object getters and graphs
  • idx.macro: Traverse properties on objects and arrays

TypeScript

Code generation

Development

React

CSS-in-JS

GraphQL

Resources

General

Developing macros

Integrations

The following projects include babel-plugin-macros, so macros can be used out of the box without additional configuration:


Footnotes

  1. preval vs codegen โ†ฉ๏ธ

Contribute

Contributions welcome! Read the contribution guidelines first.

License

CC0

To the extent possible under law, Jonas Gierer has waived all copyright and related or neighboring rights to this work.