Skip to content

Commit

Permalink
lessons are now buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Seifi committed Mar 12, 2017
1 parent 268c564 commit f5dab7d
Show file tree
Hide file tree
Showing 54 changed files with 112 additions and 103 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,7 +6,7 @@
"license": "ISC",
"main": "build/app.js",
"scripts": {
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-lessons.js",
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-button.js",
"build": "../../node_modules/.bin/cross-env NODE_ENV=production ../../node_modules/.bin/webpack --config webpack.build.js --progress --colors"
},
"devDependencies": {
Expand Down
Expand Up @@ -4,15 +4,15 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin')
var HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = {
entry: ['babel-polyfill','./entry.js'],
entry: [ 'babel-polyfill','./entry.js' ],
output: {
path: path.join(__dirname + '/build'),
filename: 'app.js',
publicPath: ''
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new ExtractTextPlugin({ filename: 'lessons.css', disable: false, allChunks: true }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/plain.ejs' }),
new ExtractTextPlugin({ filename: 'button.css', disable: false, allChunks: true }),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
Expand Down
Expand Up @@ -4,6 +4,8 @@ var HtmlWebpackPlugin = require('html-webpack-plugin')
var settings = require('../../scripts/settings.js')
var devServer = settings.devServer

console.log(path.join(__dirname))

module.exports = {
devServer: devServer,
devtool: 'source-map',
Expand All @@ -16,10 +18,10 @@ module.exports = {
output: {
path: path.join(__dirname),
filename: 'bundle.js',
publicPath: 'http://' + devServer.host + ':' + devServer.port + '/',
publicPath: '/'
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/server.ejs' }),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,7 +6,7 @@
"license": "ISC",
"main": "build/app.js",
"scripts": {
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-lessons.js",
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-button.js",
"build": "../../node_modules/.bin/cross-env NODE_ENV=production ../../node_modules/.bin/webpack --config webpack.build.js --progress --colors"
},
"devDependencies": {
Expand Down
Expand Up @@ -11,8 +11,8 @@ module.exports = {
publicPath: ''
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new ExtractTextPlugin({ filename: 'lessons.css', disable: false, allChunks: true }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/plain.ejs' }),
new ExtractTextPlugin({ filename: 'button.css', disable: false, allChunks: true }),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
Expand Down
Expand Up @@ -16,10 +16,10 @@ module.exports = {
output: {
path: path.join(__dirname),
filename: 'bundle.js',
publicPath: 'http://' + devServer.host + ':' + devServer.port + '/',
publicPath: '/'
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/server.ejs' }),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
Expand Down
1 change: 0 additions & 1 deletion 03-radium/lessons/App.js → 03-radium/button/App.js
@@ -1,7 +1,6 @@
import React, { Component } from 'react'
import pkg from './package.json'
import { Button } from './Button/Button'
import '../../public/css/lessons.css'

export default class App extends Component {
render () {
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -6,7 +6,7 @@
"license": "ISC",
"main": "build/app.js",
"scripts": {
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-lessons.js",
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-button.js",
"build": "../../node_modules/.bin/cross-env NODE_ENV=production ../../node_modules/.bin/webpack --config webpack.build.js --progress --colors"
},
"devDependencies": {
Expand Down
Expand Up @@ -11,8 +11,8 @@ module.exports = {
publicPath: ''
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new ExtractTextPlugin({ filename: 'lessons.css', disable: false, allChunks: true }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/plain.ejs' }),
new ExtractTextPlugin({ filename: 'button.css', disable: false, allChunks: true }),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
Expand Down
Expand Up @@ -16,10 +16,10 @@ module.exports = {
output: {
path: path.join(__dirname),
filename: 'bundle.js',
publicPath: 'http://' + devServer.host + ':' + devServer.port + '/',
publicPath: '/'
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/server.ejs' }),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
Expand Down
1 change: 0 additions & 1 deletion 04-aphrodite/lessons/App.js → 04-aphrodite/button/App.js
@@ -1,7 +1,6 @@
import React, { Component } from 'react'
import pkg from './package.json'
import { Button } from './Button/Button'
import '../../public/css/lessons.css'

export default class App extends Component {
render () {
Expand Down
File renamed without changes.
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import { render } from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import App from './App'
import '../../public/css/lessons.css'

render (
<AppContainer>
Expand Down
Expand Up @@ -6,7 +6,7 @@
"license": "ISC",
"main": "build/app.js",
"scripts": {
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-lessons.js",
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-button.js",
"build": "../../node_modules/.bin/cross-env NODE_ENV=production ../../node_modules/.bin/webpack --config webpack.build.js --progress --colors"
},
"devDependencies": {
Expand Down
Expand Up @@ -11,8 +11,8 @@ module.exports = {
publicPath: ''
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new ExtractTextPlugin({ filename: 'lessons.css', disable: false, allChunks: true }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/plain.ejs' }),
new ExtractTextPlugin({ filename: 'button.css', disable: false, allChunks: true }),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
Expand Down
Expand Up @@ -16,10 +16,10 @@ module.exports = {
output: {
path: path.join(__dirname),
filename: 'bundle.js',
publicPath: 'http://' + devServer.host + ':' + devServer.port + '/',
publicPath: '/'
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/server.ejs' }),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
Expand Down
File renamed without changes.
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import { render } from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import App from './App'
import '../../public/css/lessons.css'

render (
<AppContainer>
Expand Down
Expand Up @@ -6,7 +6,7 @@
"license": "ISC",
"main": "build/app.js",
"scripts": {
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-lessons.js",
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-button.js",
"build": "../../node_modules/.bin/cross-env NODE_ENV=production ../../node_modules/.bin/webpack --config webpack.build.js --progress --colors"
},
"devDependencies": {
Expand Down
Expand Up @@ -11,8 +11,8 @@ module.exports = {
publicPath: ''
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new ExtractTextPlugin({ filename: 'lessons.css', disable: false, allChunks: true }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/plain.ejs' }),
new ExtractTextPlugin({ filename: 'button.css', disable: false, allChunks: true }),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
Expand Down
Expand Up @@ -16,10 +16,10 @@ module.exports = {
output: {
path: path.join(__dirname),
filename: 'bundle.js',
publicPath: 'http://' + devServer.host + ':' + devServer.port + '/',
publicPath: '/'
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/server.ejs' }),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
Expand Down
1 change: 0 additions & 1 deletion 06-styletron/lessons/App.js → 06-styletron/button/App.js
Expand Up @@ -3,7 +3,6 @@ import Styletron from 'styletron-client'
import { StyletronProvider } from 'styletron-react'
import pkg from './package.json'
import { Button } from './Button/Button'
import '../../public/css/lessons.css'

const styleSheet = document.createElement('style')
document.head.appendChild(styleSheet)
Expand Down
File renamed without changes.
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import { render } from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import App from './App'
import '../../public/css/lessons.css'

render (
<AppContainer>
Expand Down
Expand Up @@ -6,7 +6,7 @@
"license": "ISC",
"main": "build/app.js",
"scripts": {
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-lessons.js",
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-button.js",
"build": "../../node_modules/.bin/cross-env NODE_ENV=production ../../node_modules/.bin/webpack --config webpack.build.js --progress --colors"
},
"devDependencies": {
Expand Down
Expand Up @@ -11,8 +11,8 @@ module.exports = {
publicPath: ''
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new ExtractTextPlugin({ filename: 'lessons.css', disable: false, allChunks: true }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/plain.ejs' }),
new ExtractTextPlugin({ filename: 'button.css', disable: false, allChunks: true }),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
Expand Down
43 changes: 43 additions & 0 deletions 06-styletron/button/webpack.config.js
@@ -0,0 +1,43 @@
var path = require('path')
var webpack = require('webpack')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var settings = require('../../scripts/settings.js')
var devServer = settings.devServer

module.exports = {
devServer: devServer,
devtool: 'source-map',
entry: [
'react-hot-loader/patch',
'webpack-hot-middleware/client?reload=1',
'babel-polyfill',
'./entry'
],
output: {
path: path.join(__dirname),
filename: 'bundle.js',
publicPath: '/'
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/server.ejs' }),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: 'babel-loader'
},
{
test: /\.css$/,
use: [ 'style-loader','css-loader' ]
},
{
test: /\.json$/,
use: 'json-loader'
}
]
}
}
43 changes: 0 additions & 43 deletions 06-styletron/lessons/webpack.config.js

This file was deleted.

File renamed without changes.
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import { render } from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import App from './App'
import '../../public/css/lessons.css'

render (
<AppContainer>
Expand Down
Expand Up @@ -6,7 +6,7 @@
"license": "ISC",
"main": "build/app.js",
"scripts": {
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-lessons.js",
"start": "../../node_modules/.bin/cross-env NODE_ENV=development node ../../scripts/server-button.js",
"build": "../../node_modules/.bin/cross-env NODE_ENV=production ../../node_modules/.bin/webpack --config webpack.build.js --progress --colors"
},
"devDependencies": {
Expand Down
Expand Up @@ -10,7 +10,7 @@ module.exports = {
publicPath: ''
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/plain.ejs' }),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
Expand Down
Expand Up @@ -16,10 +16,10 @@ module.exports = {
output: {
path: path.join(__dirname),
filename: 'bundle.js',
publicPath: 'http://' + devServer.host + ':' + devServer.port + '/',
publicPath: '/'
},
plugins: [
new HtmlWebpackPlugin({ inject: true, template: '../../templates/app.ejs' }),
new HtmlWebpackPlugin({ inject: true, template: '../../templates/server.ejs' }),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -6,8 +6,8 @@
"license": "ISC",
"scripts": {
"clean": "find 0* -type d -name build | xargs rm -rf",
"start": "node scripts/make-index.js && ./node_modules/.bin/cross-env NODE_ENV=development node scripts/server-all.js",
"build": "node scripts/make-index.js && ./node_modules/.bin/cross-env NODE_ENV=production node scripts/server-all.js"
"start": "node scripts/make-index.js && ./node_modules/.bin/cross-env NODE_ENV=development node scripts/server.js",
"build": "node scripts/make-index.js && ./node_modules/.bin/cross-env NODE_ENV=production node scripts/server.js"
},
"devDependencies": {
"aphrodite": "^1.1.0",
Expand Down
File renamed without changes.

0 comments on commit f5dab7d

Please sign in to comment.