question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It is not clear how to run this Scritpt for noobs...

See original GitHub issue

Hi,

I do not understand how to run this script, yes I am a noob… but

Run Script $ extract-messages -l=en,ja -o app/translations -d en --flat false 'app/**/!(*.test).js'

is not really helpfull… Do I need to run this command in the shell where I ran the npm install…? -this is what I get:

$ extract-messages -l=en,ja -o app/translations -d en --flat false 'app/**/!(*.test).js' bash: extract-messages: command not found

So I need to run it somewhere else, or do something else before running it?

Please explain what is the difference between the packages: extract-react-intl/extract-react-intl-messages

Thank you

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
akamecocommented, Feb 27, 2018

If you already have .babelrc, don’t need anything.This tool is using babelrc for parsing code. If you use jsx, you should add babel-preset-react. if you use flowtype, you should add babel-preset-flow…etc etc…

1reaction
akamecocommented, Feb 26, 2018

OK, I understand.

First, this tool needs .babelrc.

.babelrc

{
  "presets": [
    "react-app"
  ]
}

Next, update npm script like this.

{
  "name": "intl-test",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-scripts": "1.1.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
+	"intl": "NODE_ENV=development extract-messages -l=en,ja -o src/i18n -d en --flat false 'src/**/!(*.test).js'"
  },
  "devDependencies": {
    "extract-react-intl-messages": "^0.8.1"
  }
}

And, run.

npm run intl

Finish🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Built In Functions - Roblox Scripting for Beginners #9 - YouTube
Use Star Code AlvinBlox when buying Robux or Premium to support the channel at no extra cost! That's star code "AlvinBlox" - thanks ......
Read more >
Free Nutty's Official OBS Commander - NOOBS CMDR 1.0.3
This tool will allow you to script macros in OBS to do things like changing scenes, toggling sources on/off, showing/hiding filters, controlling ...
Read more >
Windows PowerShell Scripting Tutorial For Beginners
Unrestricted— You can run any script you want. This option should not be used, for obvious reasons. To start working with PowerShell scripts, ......
Read more >
Google Apps Script: A Beginner's Guide
Learn Google Apps Script with this Beginner guide. ... ❗️When your first run your apps script, you may see the “app isn't verified”...
Read more >
Beginner Tutorial | AutoHotkey
Learn how to download and install AutoHotkey, to create a script, to use hotkeys and ... AutoHotkey is not magic, we all wish...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found