Skip to content

Instantly share code, notes, and snippets.

// this is a webpack config that takes a number of options
// to let you build different style bundles
// based on the webpack react example
var fs = require('fs');
var path = require('path');
var webpack = require('webpack');
var ReactStylePlugin = require('react-style-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var joinEntry = require('./lib/joinEntry');
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="562px"
height="649px" viewBox="0 0 562 649" enable-background="new 0 0 562 649" xml:space="preserve">
<g id="Polygon_2_1_" enable-background="new ">
<g id="Polygon_2">
<g>
<polygon fill="#A2BDE9" points="281.071,1 0.654,162.899 0.654,486.697 281.071,648.597 561.489,486.697 561.489,162.899 "/>
</g>
<div>
<Title>Buttons</Title>
<Container>
<Button active>Active</Button>
<Button>Button</Button>
<Button rounded>Round</Button>
</Container>
<Title>ButtonGroup</Title>
@natew
natew / out
Last active August 29, 2015 14:13
webpack.config.js
{ entry: { main: './app/app.js' },
output:
{ path: '/Users/nw/projects/reapp/reapp-hn/build/public',
filename: '[name].js',
chunkFilename: '[id].js',
publicPath: '/',
sourceMapFilename: 'debugging/[file].map',
libraryTarget: undefined,
pathinfo: true },
target: 'web',
{ entry:
{ main:
[ 'webpack-dev-server/client?http://localhost:3011',
'webpack/hot/only-dev-server',
'./app/app.js' ] },
output:
{ path: '/Users/nw/projects/reapp/reapp-hn/build/public',
filename: '[name].js',
chunkFilename: '[id].js',
publicPath: '/',
This file has been truncated, but you can view the full file.
{"errors":[],"warnings":["./app/routes.js\nCritical dependencies:\n25:16-23 require function is used in a way, in which dependencies cannot be statically extracted\n @ ./app/routes.js 25:16-23"],"version":"1.5.3","hash":"34ba053960e0a21e2f99","time":9355,"assetsByChunkName":{"main":"main.js"},"assets":[{"name":"main.js","size":1541590,"chunks":[0],"chunkNames":["main"],"emitted":true}],"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":1279840,"names":["main"],"files":["main.js"],"hash":"f2983abf0d200cca0f57","parents":[],"modules":[{"id":0,"identifier":"multi main","name":"multi main","size":52,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":[0],"assets":[],"failed":false,"errors":0,"warnings":0,"reasons":[]},{"id":1,"identifier":"/Users/nw/projects/reapp/reapp-pack/node_modules/webpack-dev-server/client/index.js?http://localhost:3011","name":"../reapp/reapp-pack/~/webpack-dev-server/client?http://localhost:3011","size":1674,"cacheable":true,"bu
@natew
natew / webpack.config.js
Created February 6, 2015 04:38
webpack
Webpack config:
{ entry:
{ main:
[ 'webpack-dev-server/client?http://localhost:3011',
'webpack/hot/only-dev-server',
'./app/app.js' ] },
output:
{ path: '/Users/nw/projects/reapp/reapp-kitchen/build/public',
filename: '[name].js',
chunkFilename: '[id].js',
"data:application/javascript;base64,InVzZSBzdHJpY3QiOwoKLy8gTG9hZCBtb2R1bGVzCgp2YXIgVXRpbHMgPSByZXF1aXJlKCIuL3V0aWxzIik7CgoKLy8gRGVjbGFyZSBpbnRlcm5hbHMKCnZhciBpbnRlcm5hbHMgPSB7CiAgICBkZWxpbWl0ZXI6ICImIiwKICAgIGluZGljZXM6IHRydWUKfTsKCgppbnRlcm5hbHMuc3RyaW5naWZ5ID0gZnVuY3Rpb24gKG9iaiwgcHJlZml4LCBvcHRpb25zKSB7CiAgICBpZiAoVXRpbHMuaXNCdWZmZXIob2JqKSkgewogICAgICAgIG9iaiA9IG9iai50b1N0cmluZygpOwogICAgfSBlbHNlIGlmIChvYmogaW5zdGFuY2VvZiBEYXRlKSB7CiAgICAgICAgb2JqID0gb2JqLnRvSVNPU3RyaW5nKCk7CiAgICB9IGVsc2UgaWYgKG9iaiA9PT0gbnVsbCkgewogICAgICAgIG9iaiA9ICIiOwogICAgfQoKICAgIGlmICh0eXBlb2Ygb2JqID09PSAic3RyaW5nIiB8fCB0eXBlb2Ygb2JqID09PSAibnVtYmVyIiB8fCB0eXBlb2Ygb2JqID09PSAiYm9vbGVhbiIpIHsKICAgICAgICByZXR1cm4gW2VuY29kZVVSSUNvbXBvbmVudChwcmVmaXgpICsgIj0iICsgZW5jb2RlVVJJQ29tcG9uZW50KG9iaildOwogICAgfQoKICAgIHZhciB2YWx1ZXMgPSBbXTsKCiAgICBpZiAodHlwZW9mIG9iaiA9PT0gInVuZGVmaW5lZCIpIHsKICAgICAgICByZXR1cm4gdmFsdWVzOwogICAgfQoKICAgIHZhciBvYmpLZXlzID0gT2JqZWN0LmtleXMob2JqKTsKICAgIGZvciAodmFyIGkgPSAwLCBpbCA9IG9iaktleXMubGVuZ3RoOyBpIDwgaWw7
@natew
natew / slideablelist.jsx
Last active August 29, 2015 14:15
Slideable List with Reapp
import React from 'react';
import DottedViewList from 'reapp-ui/views/DottedViewList';
import View from 'reapp-ui/views/View';
import { Container, Block } from 'reapp-ui/components/Grid';
import List from 'reapp-ui/components/List';
import Input from 'reapp-ui/components/Input';
import Button from 'reapp-ui/components/Button';
export default React.createClass({
getInitialState() {
Stylesheet.create({
respond: {
'max-width > 200px': {
}
}
})