If the app uses custom webpack configuration, then loader is needed to handle svgs in your app. Lets use SVGR webpack loader.
yarn add @svgr/webpack --dev
and then in your webpack config file add the following rule :
{
test: /\.svg$/,
If the app uses custom webpack configuration, then loader is needed to handle svgs in your app. Lets use SVGR webpack loader.
yarn add @svgr/webpack --dev
and then in your webpack config file add the following rule :
{
test: /\.svg$/,
module.exports = { | |
endOfLine: 'lf', | |
semi: false, | |
singleQuote: true, | |
tabWidth: 2, | |
printWidth: 80, | |
trailingComma: 'all', | |
jsxBracketSameLine: true, | |
arrowParens: 'always', | |
} |
const readline = require('readline'); | |
var ncp = require('copy-paste'); | |
const inputMessage = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
}); | |
// Promt to enter the string eg. | |
// This ain't your username, is it? |
Sorted from top to down in order of installation
const inputString = | |
'[ "AND", ["<", "var1", "var2"], [ "OR", [">", "var3", "var4"], ["==", "var5", "var6"] ] ]' | |
let cleanedString = '' | |
for (var i = 0; i < inputString.length; i++) { | |
if ( | |
inputString[i] !== '[' && | |
inputString[i] !== ']' && | |
inputString[i] !== '"' | |
) { |
console.log('Extracted all strings from program ', '\n') | |
import * as fs from 'fs' | |
import { sync as globSync } from 'glob' | |
import { sync as mkdirpSync } from 'mkdirp' | |
const filePattern = './build/messages/**/*.json' | |
const outputLanguageDataDir = './build/locales/' | |
console.log('Piping followings ids :') |