This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-strex --save-dev
The "strex" task
In your project's Gruntfile, add a section named
strex to the data object passed into
A regular expression specifying the strings you want to match.
A string used to replace whatever the matching string was. Follow RegExp guidelines.
A string to print between each matching and replaced string.
A string to print between each file string. Please note that files with no strings in it or with syntax error won't appear in the result.
The standard version used for the JS parser.
Whether or not comments with filenames should appear in the result.
If comments are active, the token to print before the filename.
If comments are active, the token to print after the filename.
If you have a file
src/testing.js with content:
var tags ="@title Hello""@name Sexy";
Using this options:
You extract all strings of the
src/testing.js file to the resulting
title: Hello, name: Sexy