Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
src/ | ||
test/ | ||
coverage/ | ||
docs-site/ | ||
server.js | ||
webpack.docs.config.js |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<html> | ||
|
||
<head> | ||
<link rel="stylesheet" type="text/css" href="style.css"> | ||
<title>publish-decorator</title> | ||
<meta charset="UTF-8"> | ||
<meta name="description" content="@publish makes class/method global "> | ||
<meta name="keywords" content="publish-decorator, es7"> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
|
||
<!-- vendors --> | ||
<script src="bundle.js" type="text/javascript"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
|
||
class App extends React.Component { | ||
|
||
componentDidMount() { | ||
document.body.setAttribute('dir','rtl'); | ||
} | ||
|
||
render() { | ||
return (<h1>ΩΨ§Ψ¬Ψ±</h1>); | ||
} | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './app'; | ||
|
||
ReactDOM.render(<App />, document.getElementById('app')); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require(`lib/`); | ||
module.exports = require('./lib/index.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
var express = require('express') | ||
var webpack = require('webpack') | ||
var merge = require('lodash/merge') | ||
var config = merge({}, require('./webpack.docs.config')) | ||
|
||
config.devtool = 'cheap-module-eval-source-map' | ||
config.entry.unshift('webpack-hot-middleware/client') | ||
config.plugins.push( | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.NoErrorsPlugin() | ||
) | ||
|
||
var app = express() | ||
var compiler = webpack(config) | ||
|
||
app.use(require('webpack-dev-middleware')(compiler, { | ||
noInfo: true, | ||
publicPath: config.output.publicPath | ||
})) | ||
|
||
app.use(require('webpack-hot-middleware')(compiler)) | ||
|
||
app.use(express.static('docs-site')) | ||
|
||
app.listen(8008, 'localhost', function (err) { | ||
if (err) { | ||
console.log(err) | ||
return | ||
} | ||
console.log(`...running ππΏ ππ» `); | ||
console.log('π Listening at http://localhost:8008 π π π '); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
var path = require('path') | ||
var webpack = require('webpack') | ||
var ExtractTextPlugin = require('extract-text-webpack-plugin') | ||
|
||
module.exports = { | ||
entry: [ | ||
'./docs-site/src/boot' | ||
], | ||
output: { | ||
path: path.resolve('./docs-site/'), | ||
filename: 'bundle.js', | ||
publicPath: '/' | ||
}, | ||
resolve: { | ||
extensions: ['', '.js', '.jsx'], | ||
|
||
// Needed to direct the docs to the local version of the datepicker, this is not needed for | ||
// normal setup. | ||
alias: { | ||
'publish-decorator': path.resolve('./src/index.js') | ||
} | ||
}, | ||
module: { | ||
loaders: [ | ||
{ test: /\.js/, loader: 'babel', exclude: /node_modules/ }, | ||
{ test: /\.scss/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader!sass-loader') }, | ||
{ test: /\.css/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') } | ||
] | ||
}, | ||
node: { Buffer: false }, | ||
plugins: [ | ||
new webpack.optimize.DedupePlugin(), | ||
new ExtractTextPlugin('style.css', { allChunks: true }), | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) | ||
}) | ||
] | ||
} |