Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!