From 606cb045136f581716f5df64c2a7bccb21aacaea Mon Sep 17 00:00:00 2001 From: Julien Bisconti Date: Sun, 18 Mar 2018 12:59:03 +0100 Subject: [PATCH] critical css --- README.md | 2 +- build.js | 8 +- critical-css.js | 30 + index.html | 2 + index.tmpl | 28 - package.json | 5 +- favicon.png => website/favicon.png | Bin website/index.html | 913 +++++++++++++++++++++++++++++ index.js => website/index.js | 0 website/index.tmpl | 255 ++++++++ style.css => website/style.css | 0 11 files changed, 1209 insertions(+), 34 deletions(-) create mode 100644 critical-css.js delete mode 100644 index.tmpl rename favicon.png => website/favicon.png (100%) create mode 100644 website/index.html rename index.js => website/index.js (100%) create mode 100644 website/index.tmpl rename style.css => website/style.css (100%) diff --git a/README.md b/README.md index 2ab3aea..71d50b5 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ If this list is not complete, you can [contribute][editREADME] to make it so. He ***You can see the updates from [TWITTER](https://twitter.com/awesome_docker)*** -> **Please**, help organize these resources so that they are _easy to find_ and _understand_ for new comers. See how to **[Contribute](https://github.com/veggiemonk/awesome-docker/blob/master/CONTRIBUTING.md)** for tips! +> **Please**, help organize these resources so that they are _easy to find_ and _understand_ for new comers. See how to **[Contribute](https://github.com/veggiemonk/awesome-docker/blob/master/.github/CONTRIBUTING.md)** for tips! #### *If you see a link here that is not (any longer) a good fit, you can fix it by submitting a [pull request][editREADME] to improve this file. Thank you!* diff --git a/build.js b/build.js index 5b9f348..4c04a27 100644 --- a/build.js +++ b/build.js @@ -27,20 +27,20 @@ const converter = new showdown.Converter({ // converter.setFlavor('github'); console.log('Loading files...'); -const index = fs.readFileSync('index.tmpl', 'utf8'); +const index = fs.readFileSync('website/index.tmpl', 'utf8'); const readme = fs.readFileSync('README.md', 'utf8'); console.log('Merging files...'); const $ = cheerio.load(index); $('#md').append(converter.makeHtml(readme)); -console.log('Writing main.html'); -fs.writeFileSync('main.html', $.html(), 'utf8'); +console.log('Writing index.html'); +fs.writeFileSync('website/index.html', $.html(), 'utf8'); console.log('Bundling with Parcel.js'); console.log(''); -new Parcel('main.html', { +new Parcel('website/index.html', { name: 'build', // publicURL: '/awesome-docker' publicURL: '/' diff --git a/critical-css.js b/critical-css.js new file mode 100644 index 0000000..5a88617 --- /dev/null +++ b/critical-css.js @@ -0,0 +1,30 @@ +const path = require('path'); +const fs = require('fs'); +const tmpDir = require('os').tmpdir(); +const request = require('request'); +const criticalcss = require('criticalcss'); + +const cssUrl = + 'https://awesome-docker.netlify.com/16dc205b0ca3044a54bfb5fc8384de31.css'; +const cssPath = path.join(tmpDir, 'style.css'); +request(cssUrl) + .pipe(fs.createWriteStream(cssPath)) + .on('close', () => { + criticalcss.getRules(cssPath, (err, output) => { + if (err) { + throw new Error(err); + } else { + criticalcss.findCritical( + 'https://awesome-docker.netlify.com/', + { rules: JSON.parse(output) }, + (err, output) => { + if (err) { + throw new Error(err); + } else { + console.log(output); + } + } + ); + } + }); + }); diff --git a/index.html b/index.html index 572c816..d072a82 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,8 @@ Awesome-docker +

We moved to a new place, click here to be redirected.

diff --git a/index.tmpl b/index.tmpl deleted file mode 100644 index 8a6fb62..0000000 --- a/index.tmpl +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Awesome-docker - - - - - - - - - - - -
- - - - \ No newline at end of file diff --git a/package.json b/package.json index 31da402..4066192 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "> A curated list of Docker resources and projects Inspired by [@sindresorhus](https://github.com/sindresorhus)' [awesome][sindresorhus] and improved by these **[amazing contributors](https://github.com/veggiemonk/awesome-docker/graphs/contributors)**.", "main": "index.js", "scripts": { - "build": "node build.js", + "build": "rimraf ./dist/ && node build.js", "convert": "showdown makehtml -i README.md -o README.html --omitExtraWLInCodeBlocks --simplifiedAutoLink --excludeTrailingPunctuationFromURLs --literalMidWordUnderscores --strikethrough --tables --tablesHeaderId --ghCodeBlocks --tasklists --disableForced4SpacesIndentedSublists --simpleLineBreaks --requireSpaceBeforeHeadingText --ghCompatibleHeaderId --ghMentions --backslashEscapesHTMLTags --emoji --splitAdjacentBlockquotes", "package": "parcel build index.html --public-url /awesome-docker" }, @@ -20,8 +20,11 @@ "homepage": "https://github.com/veggiemonk/awesome-docker#readme", "dependencies": { "cheerio": "^1.0.0-rc.2", + "criticalcss": "^2.1.0", "inline-assets": "^1.2.4", "parcel-bundler": "^1.6.2", + "request": "^2.85.0", + "rimraf": "^2.6.2", "showdown": "^1.8.6" }, "devDependencies": { diff --git a/favicon.png b/website/favicon.png similarity index 100% rename from favicon.png rename to website/favicon.png diff --git a/website/index.html b/website/index.html new file mode 100644 index 0000000..5660570 --- /dev/null +++ b/website/index.html @@ -0,0 +1,913 @@ + + + + + Awesome-docker + + + + + + + + + + + + +

Awesome Docker Awesome Join the chat at https://gitter.im/veggiemonk/awesome-docker Say Thanks

+
+

A curated list of Docker resources and projects
+ Inspired by @sindresorhus' awesome and improved by these amazing contributors.

+
+

It's now a GitHub project because it's considerably easier for other people to edit, fix and expand on Docker using GitHub.
+Just click README.md to submit a pull request.
+If this list is not complete, you can contribute to make it so. Here is a great video tutorial to contribute on Github

+

You can see the updates from TWITTER

+
+

Please, help organize these resources so that they are easy to find and understand for new comers. See how to Contribute for tips!

+
+ +

The creators and maintainers of this list do not receive and should not receive any form of payment to accept a change made by any contributor.
+The goal of this repo is to index open-source projects, not to advertise for profit.

+

All the links are monitored and tested with awesome_bot made by @dkhamsing

+

Contents

+ +

Legend

+ +

What is Docker

+
+

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.

+
+

Source: What is Docker

+

Where to start

+ +

Cheatsheets by

+ +

Where to start (Windows)

+ +
+

Projects

+

Moby = open source development

+

Docker CE = free product release based on Moby

+

Docker EE = commercial product release based on Docker CE.

+

Docker EE is on the same code base as Docker CE, so also built from Moby, with commercial components added, such as "docker data center / universal control plane"

+ +

Container Operations

+

Container Composition

+ +

Deployment and Infrastructure

+ +

Monitoring

+ +

Networking

+ +

Orchestration

+ +

PaaS

+ +

Reverse Proxy

+ +

Security

+ +

Service Discovery

+ +

Volume Management / Data

+ +

User Interface

+

Desktop

+

Native desktop applications for managing and montoring docker hosts and clusters

+ +

Terminal

+ +

Web

+ +

Docker Images

+

Base Tools

+

Tools and applications that are either installed inside containers or designed to be run as a sidecar

+ +

Builder

+

Applications designed to help or simplify building new images

+ +

Dockerfile

+ +

Examples by:

+ +

Linter

+ +

Metadata

+ +

Registry

+

Services to securely store your Docker images.

+ +

Development with Docker

+

API Client

+ +

CI/CD

+ +

Development Environment

+ +

Garbage Collection

+ +

Serverless

+ +

Testing

+ +

Wrappers

+ +

Services based on Docker (💲)

+

CI Services

+ +

CaaS

+ +

Monitoring Services

+ +

Useful Resources

+ +

Blogs by

+ +

Awesome Lists

+ +

Good Tips

+ +

Raspberry Pi & ARM

+ +

Security

+ +

Videos

+ +

Communities and Meetups

+

Brazilian

+ +

Chinese

+ +

English

+ +

Russian

+
+ + + + + + \ No newline at end of file diff --git a/index.js b/website/index.js similarity index 100% rename from index.js rename to website/index.js diff --git a/website/index.tmpl b/website/index.tmpl new file mode 100644 index 0000000..e011798 --- /dev/null +++ b/website/index.tmpl @@ -0,0 +1,255 @@ + + + + + + + + Awesome-docker + + + + + + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/style.css b/website/style.css similarity index 100% rename from style.css rename to website/style.css