git-metrics Svelte Themes

Git Metrics

A Svelte application to graph metrics for GitHub repositories

git-metrics

The idea behind this application is to provide reporting on github projects.
This project uses Apollo Graphql via svelte-apollo to pull data and Pancake/D3js to render reports.

Pull Requests are welcomed.

svelte app

This project was created from the template for Svelte apps. It lives at https://github.com/sveltejs/template.

Note that you will need to have Node.js v12.6.0 installed.

Getting started

Clone this repsitory

git clone [email protected]:DocuRe/git-metrics.git

Install the dependencies...

cd git-metrics
npm install

Copy and edit config.example.json

cp config.example.json config.json

Edit config.json and replace INSERT_TOKEN_HERE with your Github token (reference)

Now start Rollup:

npm run dev

You should see an output similar to this;

  Your application is ready~! 🚀

  - Local:      http://0.0.0.0:5000
  - Network:    http://192.168.1.73:5000

Building and running in production mode

To create an optimised version of the app:

npm run build

Single-page app mode

By default, sirv will only respond to requests that match files in public. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere.

If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for any path. You can make it so by editing the "start" command in package.json:

"start": "sirv public --single"

Deploying to the web

With now

Install now if you haven't already:

npm install -g now

Then, from within your project folder:

cd public
now deploy --name my-project

As an alternative, use the Now desktop client and simply drag the unzipped project folder to the taskbar icon.

With surge

Install surge if you haven't already:

npm install -g surge

Then, from within your project folder:

npm run build
surge public my-project.surge.sh

Top categories

Loading Svelte Themes