1.0.2 • Published 7 years ago
babel-plugin-actions v1.0.2
babel-plugin-actions
Babel plugin to generate traceable type for the-actions.
Issues related to the-actions should be reporter on the-actions issue-tracker.
Install
npm install --save-dev babel-plugin-actionsUsage
Run:
babel --plugins actions script.jsOr add the plugin to your .babelrc configuration:
{
"plugins": [ "actions" ]
}Example
The plugin will compile the following code:
// actions.js
const UserAction = ActionCreator();
const OtherActions = {
Example: ActionCreator()
}into:
// actions.js
const UserAction = ActionCreator("actions.js: UserAction");
const OtherActions = {
Example: ActionCreator("actions.js: OtherActions.Example")
}