https://github.com/bigbinary/babel-preset-neeto
A babel preset to transform short code to boilerplate at compile time
https://github.com/bigbinary/babel-preset-neeto
Last synced: about 1 month ago
JSON representation
A babel preset to transform short code to boilerplate at compile time
- Host: GitHub
- URL: https://github.com/bigbinary/babel-preset-neeto
- Owner: bigbinary
- License: mit
- Created: 2023-04-03T10:44:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-17T14:58:19.000Z (3 months ago)
- Last Synced: 2025-04-13T12:12:48.433Z (about 1 month ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 8
- Watchers: 19
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# babel-preset-neeto
A babel transformer to minimize boilerplate code in neeto products.
## Usage
babel-preset-neeto is designed in an assumption that it will be run before all
other presets or plugins. To make that possible, you need to add
`@bigbinary/neeto` towards the end of your `presets` array in `babel.config.js`
as shown below. Babel presets will run in last-to-first order.```js
module.exports = {
presets: [
// ...all other presets
"@bigbinary/neeto",
];
}
```Babel runs the plugins before presets. But usually plugins do minor code
transformations which won't affect babel-preset-neeto. But if any of them
interfere with babel-preset-neeto, add plugins directly to the top of the
`plugins` array as shown below. Babel plugins are run in first-to-last order.```js
const zustandPickPlugin = require("@bigbinary/babel-preset-neeto/src/plugins/zustand-pick");
const anyOtherPluginFromNeeto = require("@bigbinary/babel-preset-neeto/src/plugins/other-plugin-name");module.exports = {
plugins: [
zustandPickPlugin,
anyOtherPluginFromNeeto,
// ...all your plugins
],
presets: [
// ...all your presets
];
}
```## Available plugins
- [zustand-pick](https://github.com/bigbinary/babel-preset-neeto/blob/main/docs/zustand-pick.md)
- [zustand-pick-from](https://github.com/bigbinary/babel-preset-neeto/blob/main/docs/zustand-pick-from.md)## Other links
- [Development instructions](./docs/development-instructions.md)
- [References and learning materials](./docs/references.md)