-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add webpack & gulp to allow faster building and separate files - remove copy-pasted dependencies to npm
- Loading branch information
1 parent
e67ed7b
commit 967e783
Showing
12 changed files
with
13,773 additions
and
2,254 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 +1,3 @@ | ||
node_modules/ | ||
node_modules/ | ||
steemit-profile.js | ||
.DS_Store |
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
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Dependencies | ||
var gulp = require('gulp'); | ||
var webpack = require('webpack'); | ||
var gutil = require('gulp-util'); | ||
|
||
// Configurations | ||
var webpackConfig = require('./webpack.config'); | ||
|
||
var getWebpackCallback = function(cb) { | ||
return function(err, stats) { | ||
if (err) | ||
throw new gutil.PluginError("webpack", err); | ||
|
||
gutil.log("[webpack]", stats.toString({ | ||
chunks: false, // Makes the build much quieter | ||
colors: true | ||
})); | ||
|
||
if (cb) { | ||
if (stats.hasErrors() || stats.hasWarnings()) | ||
cb('webpack failed'); | ||
else | ||
cb(); | ||
} | ||
} | ||
} | ||
|
||
gulp.task('compile', function(cb) { | ||
return webpack(webpackConfig).run(getWebpackCallback(cb)); | ||
}); | ||
|
||
|
||
gulp.task('watch', function () { | ||
webpack(webpackConfig).watch({}, getWebpackCallback()); | ||
}); |
Oops, something went wrong.