www.jsdelivr.com icon indicating copy to clipboard operation
www.jsdelivr.com copied to clipboard

The official jsDelivr website

www.jsdelivr.com

Related projects:

Web performance

We use SpeedCurve to track the performance of our website. All data and dashboards are public. We invite everyone to analyze it and send us PRs to help us improve the performance of our website.

We track 2 of our web pages, the homepage and a package page and benchmark them 3 times per day. You begin be checking the following dashboards:

Development

The website uses Ractive.js, ractive-route, and a custom build of Bootstrap v3. To add a new page, you need to create a new .html in views/pages (use one of the existing ones as a reference), and add it to client-side routing. All .html files are compiled as Ractive.js components. Styles are in a separate less directory, which mirrors the views structure.

Setup

$ npm install
$ node src

Configuration for IntelliJ based IDEs is also available in this repository. If you use one, it is a good idea to add https://github.com/MartinKolarik/idea-config as a read-only settings repository. It contains code style and inspection profiles used by this project.

Testing

  • JS code style: npm run lint:js
  • CSS code style: npm run lint:css
  • Integration tests: npm run mocha
  • All combined: npm test

Most IDEs have plugins integrating the used linters (eslint, stylelint), including support for automated fixes on save.

Contributing

  • Bug fixes and changes discussed in the existing issues are always welcome.
  • For new ideas, please open an issue to discuss them before sending a PR.
  • Make sure your PR passes npm test and has appropriate commit messages.
  • A Heroku preview is built automatically for every PR and will be reviewed before merging.

Production config

module.exports = {
    server: {
        port: 'SERVER_PORT', // defaults to 4400
    },
}

Additionally, ELASTIC_APM_SERVER_URL, ELASTIC_APM_SECRET_TOKEN, ELASTIC_SEARCH_URL (including user + pass), and NODE_ENV=production should be set.

Staging: https://jsdelivr-com.herokuapp.com/