Skip to content

Chartist v1 without yarn/npm? #1408

Answered by stklcode
robkaper asked this question in Q&A
Discussion options

You must be logged in to vote

You can use the UMD bundle of the Chartist lib and just copy the relevant one or two files to your project:

  • index.umd.js
  • index.css (optional)

If you downloaded the NPM package, they are both located in node_modules/chartist/dist/

We do ship it this way in some projects where the typical distribution is something like a ZIP bundle and not a NPM package. If the build-process features a package manager, it's dynamically copied at build time. Otherwise just making a hard copy should be fine, too.

Minimal working example:

<html>
<head>
  <title>Chartist Test</title>
  <script src="node_modules/chartist/dist/index.umd.js"></script>
  <link rel="stylesheet" href="node_modules/chartist/dist/ind…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by robkaper
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants