diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..38733e6 --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["react", "es2015", "stage-0"] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f8b55ca --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +charset = utf-8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36170a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +public diff --git a/dev-server.js b/dev-server.js new file mode 100644 index 0000000..2ab7342 --- /dev/null +++ b/dev-server.js @@ -0,0 +1,19 @@ +'use strict' + +let webpack = require('webpack'); +let WebpackDevServer = require('webpack-dev-server'); +let config = require('./webpack.config'); + +new WebpackDevServer(webpack(config), { + publicPath: config.output.publicPath, + hot: true, + historyApiFallback: true, + inline: true, + progress: true +}).listen(3000, '0.0.0.0', function (err, result) { + if (err) { + console.log(err); + } + + console.log('Listening at 0.0.0.0:3000'); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..3e6fd23 --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "email.perf", + "version": "1.0.0", + "main": "index.jsx", + "private": true, + "scripts": { + "dev": "NODE_ENV=development node dev-server.js", + "postinstall": "NODE_ENV=production webpack -p --progress --colors --bail" + }, + "dependencies": { + "babel-eslint": "^6.0.2", + "babel-loader": "^6.2.4", + "babel-preset-es2015": "^6.6.0", + "babel-preset-react": "^6.5.0", + "babel-preset-stage-0": "^6.5.0", + "css-loader": "^0.23.1", + "eslint": "^2.7.0", + "eslint-loader": "^1.3.0", + "express": "^4.13.4", + "file-loader": "^0.8.5", + "html-webpack-plugin": "^2.15.0", + "style-loader": "^0.13.1", + "svg-sprite-loader": "0.0.18", + "tachyons": "^4.0.0-beta.27", + "uglify": "^0.1.5", + "uglify-loader": "^1.3.0", + "url-loader": "^0.5.7", + "webpack": "^1.12.15", + "webpack-dev-server": "^1.14.1" + } +} diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..dc16141 --- /dev/null +++ b/src/index.html @@ -0,0 +1,87 @@ + + + + + perf.email + + + +
+

perf.email

+
+ +
+
+

Important web performance tools, tips, talks and resources in your inbox.

+

+ perf.email is a bi-monthly newsletter bringing you the most interesting studies of all things web performance and user-experience. If it happens between the server and the human, you'll find it here. +

+
+ +
+
+
+

Sign up now

+
+ + +
+

Don’t sweat it, we hate spam too.

+
+
+
+ + +
+

Previous issues

+ + +
+ +
+

Sponsors

+ +

+ perf.email has a single sponsorship oppurtunity for each issue. +

+
+
+ +
+
+

+ Follow perfemail on Twitter for updates, send in suggestions for the next issue. +

+
+ +
+ + + +
+
+ + diff --git a/src/index.jsx b/src/index.jsx new file mode 100644 index 0000000..02e0101 --- /dev/null +++ b/src/index.jsx @@ -0,0 +1,7 @@ +'use strict' + +// CSS +import tachyons from 'tachyons/css/tachyons.css' +import styles from './style.css' + +import logo from './logo.svg' diff --git a/src/logo.svg b/src/logo.svg new file mode 100644 index 0000000..8b90482 --- /dev/null +++ b/src/logo.svg @@ -0,0 +1 @@ + diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..f3140f6 --- /dev/null +++ b/src/style.css @@ -0,0 +1,47 @@ + +body { + font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif; + background-color: rgba(78, 185, 110, .1); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +fieldset { + border: 0; + margin: 0; + padding: 0; +} + +.bright { color: rgba(78, 185, 110, 1); } +.b-bright { border-color: rgba(78, 185, 110, 1); } +.b-bright-dimmed { border-color: rgba(78, 185, 110, .5); } +.bg-bright { background-color: rgba(78, 185, 110, 1); } +.bright-dimmed { color: rgba(78, 185, 110, .5); } + +.br-left { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} + +.br-right { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} + +button { + border-left: 1px solid rgba(0, 0, 0, .1) !important; + color: rgba(78, 185, 110, .8); + cursor: pointer; + transition: all .25s; +} + +button:hover { + color: rgba(78, 185, 110, 1); +} + +.avatar { + background-size: cover; + background-color: rgba(78, 185, 110, .5); + background-blend-mode: screen; + /*box-shadow: 0 0 0 2px rgba(78, 185, 110, .4);*/ +} diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..8a5126e --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,53 @@ +'use strict' + +let webpack = require('webpack') +let HtmlWebpackPlugin = require('html-webpack-plugin') + +module.exports = { + context: __dirname + '/src', + entry: { + javascript: './index.jsx' + }, + output: { + filename: 'index.js', + path: __dirname + '/public', + publicPath: '/' + }, + plugins: [ + new HtmlWebpackPlugin({ + inject: true, + template: './index.html' + }), + new webpack.optimize.UglifyJsPlugin({ + output: { + comments: false + } + }) + ], + module: { + preLoaders: [ + { + test: /\.js$/, + loader: 'eslint-loader', + exclude: /node_modules/ + } + ], + loaders: [ + { + test: /\.jsx?$/, + exclude: /node_modules/, + loaders: ['react-hot', 'babel-loader'], + }, + { + test: /\.css?$/, + loaders: ['style/url', 'file'] + }, + { + test: /\.svg?$/, + loaders: [ + 'svg-sprite' + ] + } + ] + } +}