babel-udf-helpers
A tool to create user-defined helpers that can be used in your babel plugin.
The usability is like that of @babel/helpers.
📦 Installation
npm install --save-dev babel-udf-helpers
❤️ Support Version
- node.js (>=10.15)
- typescript target (ES2018)
📖 Usage
Use in your babel plugin as follows.
It works the same as babel-helpers addHelper, so you can use it anywhere in your visitor.
;; { { ; } visitor: { this } { this } }
helpers.js
looks like the following.
; const helpers = Object;; helpersprogramHelper = helper` export default function _programHelper(){ return "programHelper"; };` helpersimportHelper = helper` export default function _importHelper(){ return "importHelper"; };`
📚 Documents
Full docs are available at https://yukihirop.github.io/babel-udf-helpers
⚽ Example
Run the plugin test with babel-udf-helpers
in typescript and javascript.
📝 License
The gem is available as open source under the terms of the MIT License.
🤝 Contributing
- Fork it ( http://github.com/yukihirop/babel-udf-helpers/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request