Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

267
Vistas
How to use github javascript repositories on my webpage?

This has been bothering me for a long time, today I finally decided I need to get it solved. If this is off-topic, please kindly tell me where should I post this question.

I've been trying to use this javascript repository on github: https://github.com/jasondavies/d3-cloud. I know very little about github, node.js and npm, I just simply want to make a beautiful word cloud on my html page, but it seems everyone on github assume their readers are no newbies like me.

What I have tried:

  1. I have downloaded the .zip file and extracted them into a project folder. Then under the folder I create a test.html file:
 <head>
  <script src="/project/build/d3.layout.cloud.js"></script>
</head>
<body>
  <div id="test">

  </div>
</body>

The DOC is very simple. Without any actual example, I don't know how to get started. I've tried

d3.layout.cloud('#test').start();

It doesn't work at all. The DOC does mention examples, there are only two files under the example folder. They are all node.js javascript files. So I can't directly use it because they use require. So I tried to install them on my linux server.

  1. I create a project folder on my server, and then ran

    git clone https://github.com/jasondavies/d3-cloud.git

Now there are two folders under folder project: d3-cloud and node_modules. Not knowing if I have successfully installed it, I went into folder d3-cloud and ran

npm i

Now the whole folder structure is like this: enter image description here

I understand folder node_modules is dependencies but I am totally confused here.

  1. When I first did git clone did I already install the package?
  2. Is running npm i redundant? But it does create another node_modules folder and install a lot of things under it as the screenshot below shows: enter image description here Are these all dependencies of this javascript app? So many?
  3. At this point, do I HAVE TO use some bundling tools such as webpack(I merely know the name upon some brief google search) in order to use the .js file on my webpage?
about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda