babel-plugin-lookup-literals
Helps to find string literals in your code. Useful in case of l10n enhancements.
Example
In
// input code
Out
"use strict";
// output code
Installation
$ npm install babel-plugin-lookup-literals
Usage
.babelrc
(Recommended)
Via .babelrc
{
"plugins": ["lookup-literals", {
"trackStringLiteral": false,
"trackJSXText": true
}]
}
Via CLI
$ babel --plugins lookup-literals script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["lookup-literals"]
});
Example
Shows found literals in console. Plugin doesn't change source code.