-
Notifications
You must be signed in to change notification settings - Fork 136
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
1 parent
99fce73
commit e6bf759
Showing
23 changed files
with
6,813 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// https://github.com/shelljs/shelljs | ||
require('./check-versions')() | ||
require('shelljs/global') | ||
env.NODE_ENV = 'documentation' | ||
|
||
var path = require('path') | ||
var config = require('../config') | ||
var ora = require('ora') | ||
var webpack = require('webpack') | ||
var webpackConfig = require('./webpack.doc.conf') | ||
|
||
var spinner = ora('building for documentation...') | ||
spinner.start() | ||
|
||
var assetsPath = path.join(config.doc.assetsRoot, config.doc.assetsSubDirectory) | ||
rm('-rf', assetsPath) | ||
mkdir('-p', assetsPath) | ||
|
||
webpack(webpackConfig, function (err, stats) { | ||
spinner.stop() | ||
if (err) throw err | ||
process.stdout.write(stats.toString({ | ||
colors: true, | ||
modules: false, | ||
children: false, | ||
chunks: false, | ||
chunkModules: false | ||
}) + '\n') | ||
}) |
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,50 @@ | ||
var config = require('../config') | ||
var webpack = require('webpack') | ||
var merge = require('webpack-merge') | ||
var utils = require('./utils') | ||
var baseWebpackConfig = require('./webpack.base.conf') | ||
var HtmlWebpackPlugin = require('html-webpack-plugin') | ||
|
||
// add hot-reload related code to entry chunks | ||
module.exports = merge(baseWebpackConfig, { | ||
entry: { | ||
tree: ['./build/dev-client'].concat('./example/tree/main.js'), | ||
hierarchicalEdgeBundling: ['./build/dev-client'].concat('./example/hierarchicalEdgeBundling/main.js') | ||
}, | ||
module: { | ||
loaders: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) | ||
}, | ||
output: { | ||
path: config.doc.assetsRoot, | ||
publicPath: config.doc.assetsPublicPath, | ||
filename: "../docs/[name]_bundle.js" | ||
}, | ||
// eval-source-map is faster for development | ||
devtool: '#eval-source-map', | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env': config.dev.env | ||
}), | ||
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage | ||
new webpack.optimize.OccurrenceOrderPlugin(), | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.NoErrorsPlugin(), | ||
// https://github.com/ampedandwired/html-webpack-plugin | ||
new HtmlWebpackPlugin({ | ||
filename: '../docs/tree.html', | ||
template: './example/tree/index.html', | ||
chunks: ['tree'], | ||
autoInject: true | ||
}), | ||
new HtmlWebpackPlugin({ | ||
filename: '../docs/hierarchicalEdgeBundling.html', | ||
template: './example/hierarchicalEdgeBundling/index.html', | ||
chunks: ['hierarchicalEdgeBundling'], | ||
}), | ||
new HtmlWebpackPlugin({ | ||
filename: '../docs/index.html', | ||
template: './example/index.html', | ||
chunks: [], | ||
}) | ||
] | ||
}) |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>hierarchicalEdgeBundling</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
<script type="text/javascript" src="./../docs/hierarchicalEdgeBundling_bundle.js"></script></body> | ||
</html> |
Oops, something went wrong.