Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
updating boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
kenwheeler committed Jan 27, 2017
1 parent b91c376 commit 1be8ab4
Show file tree
Hide file tree
Showing 7 changed files with 5,924 additions and 89 deletions.
25 changes: 22 additions & 3 deletions .babelrc
@@ -1,8 +1,27 @@
{
"presets": ["es2015", "react", "stage-0"],
"presets": [
[ "es2015", { "loose": true, "modules" : false } ],
"stage-0",
"react"
],
"plugins": [
"transform-decorators-legacy",
],
"env": {
"development": {
"presets": ["react-hmre"]
"production": {
"plugins": [
"transform-es2015-modules-commonjs",
"transform-react-remove-prop-types",
"transform-react-constant-elements",
"transform-react-inline-elements",
"transform-runtime",
"transform-decorators-legacy",
],
},
"test": {
"plugins": [
"transform-es2015-modules-commonjs"
]
}
}
}
12 changes: 11 additions & 1 deletion .eslintrc
@@ -1,11 +1,21 @@
---
"extends":
- "eslint-config-defaults/configurations/walmart/es6-react"
- "formidable/configurations/es6-react"

"rules":
"indent": [2, 2, {"SwitchCase": 1}]
"max-len": 0
"no-magic-numbers": 0
"react/prefer-es6-class": 0
"react/no-multi-comp": 0

"env":
"browser": true,
"node": true
"globals":
"afterEach": true,
"describe": true,
"expect": true,
"it": true,
"jest": true,
"test": true
48 changes: 28 additions & 20 deletions package.json
Expand Up @@ -14,41 +14,49 @@
"license": "MIT",
"dependencies": {
"normalize.css": "3.0.3",
"react": "^15.2.1",
"react-dom": "^15.2.1",
"spectacle": "^1.0.0"
"react": "15.4.2",
"react-dom": "15.4.2",
"spectacle": "^2.0.0"
},
"devDependencies": {
"autoprefixer-core": "^6.0.1",
"babel-core": "^6.4.0",
"babel-eslint": "^5.0.0-beta6",
"babel-loader": "^6.2.1",
"babel-plugin-react-transform": "^2.0.2",
"babel-polyfill": "^6.3.14",
"babel-preset-es2015": "^6.3.13",
"babel-cli": "^6.16.0",
"babel-core": "^6.18.0",
"babel-eslint": "^7.0.0",
"babel-loader": "^6.2.5",
"babel-plugin-react-transform": "^2.0.0-beta1",
"babel-plugin-transform-decorators-legacy": "^1.2.0",
"babel-plugin-transform-react-constant-elements": "^6.4.0",
"babel-plugin-transform-react-inline-elements": "^6.4.0",
"babel-plugin-transform-react-remove-prop-types": "^0.2.1",
"babel-plugin-transform-runtime": "^6.4.3",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.3.13",
"babel-preset-react-hmre": "^1.0.1",
"babel-preset-stage-0": "^6.3.13",
"babel-runtime": "^6.18.0",
"cross-env": "^1.0.7",
"css-loader": "^0.23.0",
"eslint": "^1.8.0",
"eslint-config-defaults": "^7.1.1",
"eslint-plugin-filenames": "^0.1.2",
"eslint-plugin-react": "^3.6.3",
"eslint": "^3.8.0",
"eslint-config-formidable": "^2.0.1",
"eslint-plugin-filenames": "^1.1.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-react": "^6.4.1",
"express": "^4.13.3",
"file-loader": "^0.8.4",
"file-loader": "^0.9.0",
"html-loader": "^0.4.0",
"is-buffer": "^1.1.1",
"markdown-loader": "^0.1.7",
"node-libs-browser": "^0.5.3",
"raw-loader": "^0.5.1",
"react-transform-catch-errors": "^1.0.0",
"react-transform-hmr": "^1.0.4",
"redbox-react": "^1.2.0",
"raw-loader": "^0.5.1",
"rimraf": "^2.4.4",
"style-loader": "^0.13.0",
"surge": "latest",
"url-loader": "^0.5.6",
"webpack": "^1.12.8",
"webpack-dev-middleware": "^1.2.0",
"webpack-hot-middleware": "^2.5.0"
"webpack": "2.2.0",
"webpack-dev-middleware": "^1.8.4",
"webpack-hot-middleware": "^2.13.0"
}
}
85 changes: 36 additions & 49 deletions presentation/index.js
Expand Up @@ -3,22 +3,14 @@ import React from "react";

// Import Spectacle Core tags
import {
Appear,
BlockQuote,
Cite,
CodePane,
Deck,
Fill,
Heading,
Image,
Layout,
Link,
ListItem,
List,
Markdown,
Quote,
Slide,
Spectacle,
Text
} from "spectacle";

Expand All @@ -28,9 +20,6 @@ import preloader from "spectacle/lib/utils/preloader";
// Import theme
import createTheme from "spectacle/lib/themes/default";

// Import custom component
import Interactive from "../assets/interactive";

// Require CSS
require("normalize.css");
require("spectacle/lib/themes/default/index.css");
Expand All @@ -49,51 +38,49 @@ const theme = createTheme({
primary: "white",
secondary: "#1F2022",
tertiary: "#03A9FC",
quartenary: "#CECECE",
},{
quartenary: "#CECECE"
}, {
primary: "Montserrat",
secondary: "Helvetica"
});

export default class Presentation extends React.Component {
render() {
return (
<Spectacle theme={theme}>
<Deck transition={["zoom", "slide"]} transitionDuration={500}>
<Slide transition={["zoom"]} bgColor="primary">
<Heading size={1} fit caps lineHeight={1} textColor="secondary">
Spectacle Boilerplate
</Heading>
<Text margin="10px 0 0" textColor="tertiary" size={1} fit bold>
open the presentation/index.js file to get started
</Text>
</Slide>
<Slide transition={["fade"]} bgColor="tertiary">
<Heading size={6} textColor="primary" caps>Typography</Heading>
<Heading size={1} textColor="secondary">Heading 1</Heading>
<Heading size={2} textColor="secondary">Heading 2</Heading>
<Heading size={3} textColor="secondary">Heading 3</Heading>
<Heading size={4} textColor="secondary">Heading 4</Heading>
<Heading size={5} textColor="secondary">Heading 5</Heading>
<Text size={6} textColor="secondary">Standard text</Text>
</Slide>
<Slide transition={["fade"]} bgColor="primary" textColor="tertiary">
<Heading size={6} textColor="secondary" caps>Standard List</Heading>
<List>
<ListItem>Item 1</ListItem>
<ListItem>Item 2</ListItem>
<ListItem>Item 3</ListItem>
<ListItem>Item 4</ListItem>
</List>
</Slide>
<Slide transition={["fade"]} bgColor="secondary" textColor="primary">
<BlockQuote>
<Quote>Example Quote</Quote>
<Cite>Author</Cite>
</BlockQuote>
</Slide>
</Deck>
</Spectacle>
<Deck transition={["zoom", "slide"]} transitionDuration={500} theme={theme}>
<Slide transition={["zoom"]} bgColor="primary">
<Heading size={1} fit caps lineHeight={1} textColor="secondary">
Spectacle Boilerplate
</Heading>
<Text margin="10px 0 0" textColor="tertiary" size={1} fit bold>
open the presentation/index.js file to get started
</Text>
</Slide>
<Slide transition={["fade"]} bgColor="tertiary">
<Heading size={6} textColor="primary" caps>Typography</Heading>
<Heading size={1} textColor="secondary">Heading 1</Heading>
<Heading size={2} textColor="secondary">Heading 2</Heading>
<Heading size={3} textColor="secondary">Heading 3</Heading>
<Heading size={4} textColor="secondary">Heading 4</Heading>
<Heading size={5} textColor="secondary">Heading 5</Heading>
<Text size={6} textColor="secondary">Standard text</Text>
</Slide>
<Slide transition={["fade"]} bgColor="primary" textColor="tertiary">
<Heading size={6} textColor="secondary" caps>Standard List</Heading>
<List>
<ListItem>Item 1</ListItem>
<ListItem>Item 2</ListItem>
<ListItem>Item 3</ListItem>
<ListItem>Item 4</ListItem>
</List>
</Slide>
<Slide transition={["fade"]} bgColor="secondary" textColor="primary">
<BlockQuote>
<Quote>Example Quote</Quote>
<Cite>Author</Cite>
</BlockQuote>
</Slide>
</Deck>
);
}
}
26 changes: 15 additions & 11 deletions webpack.config.js
Expand Up @@ -17,7 +17,7 @@ module.exports = {
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
new webpack.NoEmitOnErrorsPlugin()
],
module: {
loaders: [{
Expand All @@ -28,26 +28,30 @@ module.exports = {
exclude: /node_modules/,
loader: "babel-loader",
query: {
presets:['react', 'es2015'],
env: {
development: {
plugins: [["react-transform", {
plugins: [
[
"react-transform", {
transforms: [{
transform: "react-transform-hmr",
imports: ["react"],
locals: ["module"]
}, {
transform: "react-transform-catch-errors",
imports: ["react", "redbox-react"]
}]
}]]
}
}
}
}
]
]
},
exclude: /node_modules/,
include: __dirname
}, {
test: /\.css$/,
loaders: ["style", "raw"],
loaders: ["style-loader", "raw-loader"],
include: __dirname
}, {
test: /\.svg$/,
loader: "url?limit=10000&mimetype=image/svg+xml",
loader: "url-loader?limit=10000&mimetype=image/svg+xml",
include: path.join(__dirname, "assets")
}, {
test: /\.png$/,
Expand Down
7 changes: 2 additions & 5 deletions webpack.config.production.js
Expand Up @@ -33,10 +33,7 @@ module.exports = {
}, {
test: /\.(js|jsx)$/,
exclude: /node_modules/,
loader: "babel-loader",
query: {
presets: ['es2015', 'react']
}
loader: "babel-loader"
}, {
test: /\.css$/,
loader: "style-loader!css-loader"
Expand All @@ -45,7 +42,7 @@ module.exports = {
loader: "url-loader?limit=8192"
}, {
test: /\.svg$/,
loader: "url?limit=10000&mimetype=image/svg+xml"
loader: "url-loader?limit=10000&mimetype=image/svg+xml"
}]
}
};

0 comments on commit 1be8ab4

Please sign in to comment.