Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

382
Visualizações
Which command to use for "compiling" a new NPM project?

I'm making a simple JS website using Three.js. I started my project this way:

$ npm init
$ npm install three

Where should I write my code that uses Three.js, and what is the npm command I should run to "compile" my script for something to drop in my webserver public_html?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

1 - Run "npm init", it will create package.json file in your package/project directory.

2 - Run "npm install three", it will install the external package and download it into "node_modules" folder.

3 - Create your own .js file. Example {in your package directory}/<yourMainFile>.js. Ensure in the package.json, you change the following attribute "main": "<yourMainFile>.js".

4 - Refer to "three" package usage in https://www.npmjs.com/package/three. and then write the sample code in <yourMainFile>.js

5 - If you want to test the result, run: $ node ./<yourMainFile>.js

  • Use "./" if git bash cli.

6- If inside <yourMainFile>.js file contain console.log("hello or what ever result you want to display"), then you will see the text display in the console.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda