Skip to content

Commit

Permalink
Load JS locally, instead of from foreign servers
Browse files Browse the repository at this point in the history
  • Loading branch information
kfogel committed Jun 4, 2018
1 parent 79f8ef1 commit caf1176
Show file tree
Hide file tree
Showing 6 changed files with 17,828 additions and 2 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ PSM's feature progress.
practice: it's rather expensive to generate, so once we have a new
version we like to keep it until the next time we regenerate.

## Development guidelines

We're pretty loose here right now. A few things:

1. Use conventional indentation (spaces not tabs; 2 spaces per level
for Javascript and 4 spaces for Python).

2. Feel free to use branches and PRs, but it's okay to push directly
to master too.

3. Please don't load Javascript directly from other servers; instead,
copy the exact version you need of an upstream library to the
`upstream-js/` subdirectory, including both the minified version
and the corresponding non-minified version, and update
`upstream-js/README.md` accordingly. Everything the dashboard
needs should be available locally, so that if some foreign server
goes down our dashboard keeps working.

## What's here.

* `get-inputs`
Expand Down
2 changes: 1 addition & 1 deletion burn-down.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
<body>
<div class="leftChart" id="burn-down-chart"></div>
<div class="rightChart" id="features-pie-chart"></div>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="upstream-js/d3.v5.min.js"></script>
<script src="burn-down.js"></script>
<script src="features-pie-chart.js"></script>
<script src="dashboard.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<body>
<div id="chart"></div>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="upstream-js/d3.v5.min.js"></script>
<!-- <script src="d3.v4.min.js"></script> -->
<script>
(function(d3) {
Expand Down
7 changes: 7 additions & 0 deletions upstream-js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
All external Javascript libraries we use should be stored here. They
are under their respective upstream open source copyright licenses
(which may be different from the license of the PSM Dashboard code).

* D3 v5.3.0
https://d3js.org/d3.v5.min.js
https://d3js.org/d3.v5.js
Loading

0 comments on commit caf1176

Please sign in to comment.