- Install dependencies
npm install --save-dev cheerio glob
# or
yarn add -D cheerio glob
-
Create the file
extract-i18n-json.js
in the project's root directory -
Create the export directory eg
/i18n-json
-
Add script in your
package.json
"scripts": {
"export-json": "node extract-i18n-json.js"
},