diff --git a/.travis.yml b/.travis.yml index 3819858..4beb7a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,12 @@ language: node_js node_js: -- stable + - stable cache: yarn branches: only: - - master + - master +services: + - redis-server before_deploy: yarn build deploy: provider: heroku diff --git a/Procfile b/Procfile index 4e16c15..35b7fff 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,2 @@ web: node server.js ingest_logs: node server/IngestLogsWorker.js -ingest_stats: node server/IngestStatsWorker.js diff --git a/client/About.js b/client/About.js index 5c0d99c..9b8e883 100644 --- a/client/About.js +++ b/client/About.js @@ -1,8 +1,7 @@ import React from 'react' import contentHTML from './About.md' -function About() { - return
-} +const About = () => + export default About diff --git a/client/About.md b/client/About.md index e54b017..39360a2 100644 --- a/client/About.md +++ b/client/About.md @@ -1,12 +1,4 @@ -unpkg is an [open source](https://github.com/mjackson/unpkg) project built by me, [Michael Jackson](https://twitter.com/mjackson). I built it because, as an npm package author, it felt tedious for me to use existing, git-based CDNs to make my open source work available via CDN. Development was sponsored by my company, [React Training](https://reacttraining.com). - - - -We'd love to talk to you more about training your team on [React](https://facebook.github.io/react/). Please [get in touch](mailto:hello@reacttraining.com) if interested. +unpkg is an [open source](https://github.com/unpkg) project built and maintained by [Michael Jackson](https://twitter.com/mjackson). ### Sponsors @@ -21,8 +13,6 @@ The fast, global infrastructure that powers unpkg is generously donated by [Clou -These sponsors provide some of the most robust, reliable infrastructure available today and I'm happy to be able to partner with them on unpkg. - ### Cache Behavior The CDN caches all files based on their permanent URL, which includes the npm package version. This works because npm does not allow package authors to overwrite a package that has already been published with a different one at the same version number. diff --git a/client/App.js b/client/App.js index 8a92172..5b283af 100644 --- a/client/App.js +++ b/client/App.js @@ -1,20 +1,10 @@ import React from 'react' -import { HashRouter as Router, Switch, Route } from 'react-router-dom' +import { HashRouter } from 'react-router-dom' import Layout from './Layout' -import About from './About' -import Stats from './Stats' -import Home from './Home' -const App = () => ( -Name | -Default Value | -Description | -
---|---|---|
`main` | -`unpkg`, `browser`, `main` | -The name of the field in [package.json](https://docs.npmjs.com/files/package.json) to use as the main entry point when there is no file path in the URL | -
`meta` | -- | Return metadata about any file in a package as JSON (e.g. `/any/file?meta`) | -
`expand` | -- | Expands all ["bare" `import` specifiers](https://html.spec.whatwg.org/multipage/webappapis.html#resolve-a-module-specifier) in JavaScript modules to unpkg URLs. This feature is *very experimental* | -
From {formatDate(sinceDate, 'MMM D')} to {formatDate(untilDate, 'MMM D')}, unpkg served {formatNumber(totalRequests)} requests to {formatNumber(uniqueVisitors)} unique visitors, {formatPercent(cachedRequests / totalRequests, 0)}% of which came from the cache (CDN). Over the same period, {formatPercent(errorRequests / totalRequests, 4)}% of requests resulted in server error (returned an HTTP status ≥ 500).
+From {formatDate(since, 'MMM D')} to {formatDate(until, 'MMM D')} unpkg served {formatNumber(totals.requests.all)} requests and a total of {formatBytes(totals.bandwidth.all)} of data to {formatNumber(totals.uniques.all)} unique visitors, {formatPercent(totals.requests.cached / totals.requests.all, 0)}% of which were served from the cache.
-Include only packages that received at least requests. +
Name | +Package | +Requests (% of total) | +Bandwidth (% of total) | +
---|
Protocol | +Requests (% of total) | +
---|
Include only countries that made at least requests. +
+ +Region | Requests (% of total) | Bandwidth (% of total) |
---|