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 @@ - - - -
- - - -