opensanca / trilha-javascript

Aprenda JavaScript com o material, exercícios disponibilizado aqui no repositório!
http://www.opensanca.com.br
MIT License
117 stars 41 forks source link

Compilar JS no Atom #3

Open cristofersousa opened 7 years ago

cristofersousa commented 7 years ago

Pessoas, na terça-feira, tivemos o primeiro contato com o Node e começamos a codar na IDE (Sublime/ Atom) com @RenanJPaula e tivemos que constantemente ir até o terminal e mandar executar o código:

node suaApp.js

Para minimizar isso e ser mais ágil tem alguns plugins para ambas IDE's que compilam e executam seu código JavaScript sem que seja necessário esse trâmite, abaixo está o processo para executar no ATOM:

Configuring Atom to run Node within Atom: While you can write your code in Atom and run it from the terminal separately, I prefer to run it within the IDE itself, it saves a lot of Alt + Tab. It’s not supported by default, you need to add a package to get this functionality.

Open Atom and go to Edit -> Preferences -> Install. Search for the package atom-runner and hit Install. Atom-runner will now be installed. Although you need to change the default configuration to run Node using atom-runner. The reason is that in Ubuntu, the name of the Node.js package (hence the command) is not node (it is the default everywhere else) due to the conflict with some other package, rather it’s nodejs.

To update the configuration, open ~/.atom/config.cson with your favourite text editor where ~ stands for your home directory. Paste the below lines:

runner:

scopes:

js:”nodejs”

Para mais informações segue alguns links explicando :

Para quem estiver usando o Sublime o @rodrigoboni mostra como fazer segue o link.

[],s