diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..d773762 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,30 @@ +module.exports = { + "env": { + "browser": true, + "node": true + }, + "extends": [ + "airbnb-base", + "plugin:import/errors", + "plugin:import/warnings", + "prettier", + ], + "plugins": [ + "import", + "prettier", + ], + "rules": { + "import/order": ["error", { + "groups": ["builtin", "external", "parent", "sibling", "index"], + "newlines-between": "never" + }], + "no-console": 0, + "prefer-template": 2, + "prettier/prettier": [ + "error", + { + "singleQuote": true + } + ] + } +}; \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to .github/CODE_OF_CONDUCT.md diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md diff --git a/LICENSE.md b/.github/LICENSE.md similarity index 100% rename from LICENSE.md rename to .github/LICENSE.md diff --git a/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/.gitignore b/.gitignore index ac04fcb..4ff0184 100644 --- a/.gitignore +++ b/.gitignore @@ -1,32 +1,10 @@ -### Node template -# Logs logs *.log npm-debug.log* -.idea - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git +build node_modules +.cache +dist +package-lock.json +index.html -# Created by .ignore support plugin (hsz.mobi) diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..6fe1005 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v8.10.0 diff --git a/build.js b/build.js new file mode 100644 index 0000000..eeb2a8f --- /dev/null +++ b/build.js @@ -0,0 +1,46 @@ +const fs = require('fs'); +const showdown = require('showdown'); +const cheerio = require('cheerio'); +const Parcel = require('parcel-bundler'); + +process.env.NODE_ENV = 'production'; + +const converter = new showdown.Converter({ + omitExtraWLInCodeBlocks: true, + simplifiedAutoLink: true, + excludeTrailingPunctuationFromURLs: true, + literalMidWordUnderscores: true, + strikethrough: true, + tables: true, + tablesHeaderId: true, + ghCodeBlocks: true, + tasklists: true, + disableForced4SpacesIndentedSublists: true, + simpleLineBreaks: true, + requireSpaceBeforeHeadingText: true, + ghCompatibleHeaderId: true, + ghMentions: true, + backslashEscapesHTMLTags: true, + emoji: true, + splitAdjacentBlockquotes: true +}); +// converter.setFlavor('github'); + +console.log('Loading files...'); +const index = fs.readFileSync('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 index.html'); +fs.writeFileSync('index.html', $.html(), 'utf8'); + +console.log('Bundling with Parcel.js'); +console.log(''); + +new Parcel('index.html', { + name: 'build', + publicURL: '/awesome-docker' +}).bundle(); diff --git a/index.html b/index.html deleted file mode 100644 index f64a809..0000000 --- a/index.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - Awesome-docker - - - - - - - - - - - - - - -
- - - - - - diff --git a/index.js b/index.js new file mode 100644 index 0000000..28f3ac5 --- /dev/null +++ b/index.js @@ -0,0 +1,5 @@ +const main = () => { + console.log('hi!'); +}; + +main(); diff --git a/index.tmpl b/index.tmpl new file mode 100644 index 0000000..468d730 --- /dev/null +++ b/index.tmpl @@ -0,0 +1,29 @@ + + + + + Awesome-docker + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..0ba7a10 --- /dev/null +++ b/package.json @@ -0,0 +1,38 @@ +{ + "name": "awesome-docker-website", + "version": "1.0.0", + "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", + "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", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/veggiemonk/awesome-docker.git" + }, + "author": "Julien Bisconti ", + "license": "MIT", + "bugs": { + "url": "https://github.com/veggiemonk/awesome-docker/issues" + }, + "homepage": "https://github.com/veggiemonk/awesome-docker#readme", + "dependencies": { + "cheerio": "^1.0.0-rc.2", + "inline-assets": "^1.2.4", + "parcel-bundler": "^1.6.2", + "showdown": "^1.8.6" + }, + "devDependencies": { + "babel-eslint": "^8.2.2", + "eslint": "^4.19.0", + "eslint-config-airbnb-base": "^12.1.0", + "eslint-config-prettier": "^2.9.0", + "eslint-plugin-import": "^2.9.0", + "eslint-plugin-jsx-a11y": "^6.0.3", + "eslint-plugin-prettier": "^2.6.0", + "prettier": "^1.11.1" + } +}