diff --git a/.babelrc b/.babelrc index 621117d..0bddca3 100644 --- a/.babelrc +++ b/.babelrc @@ -1,18 +1,12 @@ { "presets": [ - ["babel-preset-env", { - "targets": { - "node": true, - "uglify": false + [ + "@babel/preset-env", + { + "targets": { + "node": true + } } - }] - ], - "plugins": [ - "babel-plugin-dynamic-import-node", - "babel-plugin-syntax-export-extensions", - "babel-plugin-transform-class-properties", - "babel-plugin-transform-export-extensions", - "babel-plugin-transform-object-rest-spread", - "babel-plugin-transform-runtime" + ] ] } \ No newline at end of file diff --git a/config/webpack/environment.js b/config/webpack/environment.js index 0b8c490..c9baa6a 100644 --- a/config/webpack/environment.js +++ b/config/webpack/environment.js @@ -1,16 +1,15 @@ import postcssAutoprefixerPlugin from 'autoprefixer'; import postcssImportPlugin from 'postcss-import'; import postcssPresetEnvPlugin from 'postcss-preset-env'; +import MiniCssExtractPlugin from 'mini-css-extract-plugin'; export default class Environment { - constructor(options) { + constructor(options = {}) { this.development = true; this.production = false; this.server = false; this.docker = false; - this.locales = ['de']; - if (options !== undefined && options !== null) { this.input(options); } @@ -67,16 +66,16 @@ export default class Environment { // @HACK // ExtractTextPlugin, - MiniCssExtractPlugin, + // MiniCssExtractPlugin, } = this; // if (!ExtractTextPlugin) { // throw new Error('Need a valid ExtractTextPlugin fed into the environment object.'); // } - if (!MiniCssExtractPlugin) { - throw new Error('Need a valid MiniCssExtractPlugin fed into the environment object.'); - } + // if (!MiniCssExtractPlugin) { + // throw new Error('Need a valid MiniCssExtractPlugin fed into the environment object.'); + // } const cssLoaders = [ { @@ -85,9 +84,9 @@ export default class Environment { importLoaders: 1, sourceMap: true, modules: false, - localIdentName: production - ? '[name]__[local]--[hash:base64:5]' - : '[name]__[local]--[hash:base64:5]', + // localIdentName: production + // ? '[name]__[local]--[hash:base64:5]' + // : '[name]__[local]--[hash:base64:5]', }, }, { @@ -111,7 +110,6 @@ export default class Environment { { loader: 'resolve-url-loader', options: { - fail: true, silent: false, }, }, @@ -123,7 +121,7 @@ export default class Environment { ); } - if (!server) { + // if (!server) { // const fallback = { // loader: 'style-loader', // }; @@ -131,8 +129,15 @@ export default class Environment { // fallback, // use: cssLoaders, // }); - cssLoaders.unshift(MiniCssExtractPlugin.loader); - } + // cssLoaders.unshift(MiniCssExtractPlugin.loader); + cssLoaders.unshift({ + loader: MiniCssExtractPlugin.loader, + options: { + hmr: this.server, + // reloadAll: true, + }, + }); + // } return cssLoaders; } diff --git a/devtools/lockfiles/index.js b/devtools/lockfiles/index.js index 59a14b6..afdef89 100644 --- a/devtools/lockfiles/index.js +++ b/devtools/lockfiles/index.js @@ -4,5 +4,5 @@ if (process.env.NODE_ENV === 'production') { process.exit(0); } -require('babel-register'); +require('@babel/register'); require('./main'); diff --git a/package.json b/package.json index f16bb57..4a8239a 100644 --- a/package.json +++ b/package.json @@ -14,71 +14,65 @@ "lint:eslint": "eslint .", "postinstall": "node ./devtools/lockfiles", "prepublishOnly": "run-s build:production", - "start:webpack-dev-server": "nodemon --watch webpack.config.babel.js --watch config/webpack --watch browserslist --watch .browserslistrc --exec webpack-dev-server --mode development --env development --hot --inline", + "start:webpack-dev-server": "nodemon --watch webpack.config.babel.js --watch config/webpack --watch browserslist --watch .browserslistrc --exec webpack-dev-server --mode development --env server --inline --hot", "start": "run-p start:*" }, "devDependencies": { - "autoprefixer": "^8.6.5", - "babel-cli": "^6.26.0", - "babel-core": "^6.26.3", - "babel-eslint": "^8.2.6", - "babel-loader": "^7.1.5", - "babel-plugin-dynamic-import-node": "^2.0.0", - "babel-plugin-dynamic-import-webpack": "^1.0.2", - "babel-plugin-syntax-export-extensions": "^6.13.0", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-export-extensions": "^6.22.0", - "babel-plugin-transform-object-rest-spread": "^6.26.0", - "babel-plugin-transform-runtime": "^6.23.0", - "babel-polyfill": "^6.26.0", - "babel-preset-env": "^1.7.0", - "babel-register": "^6.26.0", - "better-npm-run": "^0.1.0", - "browserslist": "^4.0.0", - "case-sensitive-paths-webpack-plugin": "^2.1.2", - "chalk": "^2.4.1", - "css-loader": "^1.0.0", - "cssnano": "^4.0.3", - "debug": "^3.1.0", - "eslint": "4", - "eslint-config-airbnb-base": "^13.0.0", - "eslint-plugin-babel": "^5.1.0", - "eslint-plugin-import": "^2.13.0", - "eslint-plugin-json": "^1.2.0", - "execa": "^0.10.0", - "file-loader": "^1.1.11", + "@babel/cli": "^7.7.0", + "@babel/core": "^7.7.2", + "@babel/preset-env": "^7.7.1", + "@babel/register": "^7.7.0", + "autoprefixer": "^9.7.2", + "babel-eslint": "^10.0.3", + "babel-loader": "^8.0.6", + "better-npm-run": "^0.1.1", + "browserslist": "^4.7.3", + "case-sensitive-paths-webpack-plugin": "^2.2.0", + "chalk": "^3.0.0", + "core-js": "3.x", + "css-loader": "^3.2.0", + "cssnano": "^4.1.10", + "debug": "^4.1.1", + "eslint": "6", + "eslint-config-airbnb-base": "^14.0.0", + "eslint-plugin-babel": "^5.3.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-json": "^2.0.1", + "execa": "^3.3.0", + "file-loader": "^4.2.0", "html-webpack-plugin": "^3.2.0", - "image-webpack-loader": "^4.3.1", - "jimp": "^0.2.28", - "mini-css-extract-plugin": "^0.4.1", - "node-sass": "^4.9.2", - "nodemon": "^1.18.1", + "image-webpack-loader": "^6.0.0", + "jimp": "^0.8.5", + "mini-css-extract-plugin": "^0.8.0", + "node-sass": "^4.13.0", + "nodemon": "^1.19.4", "normalize-scss": "^7.0.1", - "npm-run-all": "^4.1.3", - "optimize-css-assets-webpack-plugin": "^4.0.3", - "postcss-import": "^11.1.0", - "postcss-loader": "^2.1.6", - "postcss-preset-env": "^5.2.1", - "postcss-safe-parser": "^3.0.1", - "progress-bar-webpack-plugin": "^1.11.0", - "resolve-url-loader": "^2.3.0", - "responsive-loader": "^1.1.0", - "rimraf": "^2.6.2", - "sass-lint": "^1.12.1", - "sass-loader": "^7.0.3", - "slash": "^2.0.0", - "style-loader": "^0.21.0", - "synp": "^1.3.0", - "uglifyjs-webpack-plugin": "^1.2.7", - "url-loader": "^1.0.1", + "npm-run-all": "^4.1.5", + "optimize-css-assets-webpack-plugin": "^5.0.3", + "postcss-import": "^12.0.1", + "postcss-loader": "^3.0.0", + "postcss-preset-env": "^6.7.0", + "postcss-safe-parser": "^4.0.1", + "progress-bar-webpack-plugin": "^1.12.1", + "resolve-url-loader": "^3.1.1", + "responsive-loader": "^1.2.0", + "rimraf": "^3.0.0", + "sass-lint": "^1.13.1", + "sass-loader": "^8.0.0", + "slash": "^3.0.0", + "style-loader": "^1.0.0", + "synp": "^1.7.0", + "uglifyjs-webpack-plugin": "^2.2.0", + "url-loader": "^2.2.0", "webfontloader": "^1.6.28", - "webpack": "^4.16.0", - "webpack-cli": "^3.0.8", - "webpack-dev-server": "^3.1.4", - "webpack-hot-middleware": "^2.22.2", - "webpack-merge": "^4.1.3" + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10", + "webpack-dev-server": "^3.9.0", + "webpack-hot-middleware": "^2.25.0", + "webpack-merge": "^4.2.2", + "webpack-userscript": "^2.3.1" }, "dependencies": { - "typeface-orbitron": "^0.0.54" + "typeface-orbitron": "^0.0.72" } -} +} \ No newline at end of file diff --git a/src/.babelrc b/src/.babelrc index a539e42..9e00d6f 100644 --- a/src/.babelrc +++ b/src/.babelrc @@ -1,24 +1,15 @@ { "presets": [ - ["babel-preset-env", { - "targets": { - "browsers": ">1%", - "uglify": false - }, - "modules": false - }], - "babel-preset-react" - ], - "plugins": [ - "babel-plugin-dynamic-import-node", - "babel-plugin-syntax-export-extensions", - "babel-plugin-transform-class-properties", - "babel-plugin-transform-export-extensions", - "babel-plugin-transform-react-constant-elements", - ["babel-plugin-transform-runtime", { - "helpers": false, - "polyfill": false, - "regenerator": true - }] + [ + "@babel/preset-env", + { + "targets": { + "browsers": ">1%" + }, + "useBuiltIns": "usage", + "corejs": 3, + "modules": false + } + ] ] } \ No newline at end of file diff --git a/src/dj.js b/src/dj.js new file mode 100644 index 0000000..8618af8 --- /dev/null +++ b/src/dj.js @@ -0,0 +1,3 @@ +window.addEventListener("load", () => { + document.body.classList.add("icedream"); +}); diff --git a/src/index.html b/src/index.html index 84a37f1..5eb5aff 100644 --- a/src/index.html +++ b/src/index.html @@ -1,178 +1,203 @@ -
- + + + - - - - - - - - - + + + + -