Skip to content

vsashyn/babel-plugin-lookup-literals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Via .babelrc (Recommended)

.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.

About

Plugin that helps find string literals in codebase

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published