Skip to content

Commit

Permalink
adding webpack config, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbagwell committed Jun 3, 2016
1 parent 09297d4 commit a09efe0
Show file tree
Hide file tree
Showing 13 changed files with 2,006 additions and 32 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["babel-preset-es2015-without-strict"],
"plugins": ["transform-object-rest-spread"]
}
4 changes: 4 additions & 0 deletions bin/readthemeter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node
var readTheMeter = require('../dist/reader');

readTheMeter.default();
12 changes: 12 additions & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<DOCTYPE HTML>
<html>
<head>
</head>
<body>
</body>
<script src="./main.bundle.js"></script>
<script>
document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] +
':35729/livereload.js?snipver=1"></' + 'script>')
</script>
</html>
173 changes: 173 additions & 0 deletions dist/reader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/reader.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import webpack from 'webpack';
import gulp from 'gulp';
import livereload from 'gulp-livereload';
import webpackConfig from './webpack.config';
import showStats from './showStats';


gulp.task('watchServer', () => {

let conf = webpackConfig(true);

console.log(conf);

webpack(conf).watch(100, (err, stats) => {

showStats(err, stats);

});

});

gulp.task('watchClient', () => {

let conf = webpackConfig();

livereload.listen({
port: 35729,
});

webpack(conf).watch(100, (err, stats) => {

showStats(err, stats);

livereload.changed('reloaded');

});

});

gulp.task('watch', ['watchClient', 'watchServer']);
Loading

0 comments on commit a09efe0

Please sign in to comment.