Skip to content

Commit

Permalink
fix build issues for npm users
Browse files Browse the repository at this point in the history
  • Loading branch information
puranjayjain committed Jul 4, 2016
1 parent d4e68d4 commit 8376b5e
Show file tree
Hide file tree
Showing 11 changed files with 1,270 additions and 26,965 deletions.
26,438 changes: 0 additions & 26,438 deletions build/ReactMaterialUiNotifications.js

This file was deleted.

9 changes: 0 additions & 9 deletions build/ReactMaterialUiNotifications.min.js

This file was deleted.

1,106 changes: 626 additions & 480 deletions build/app.js

Large diffs are not rendered by default.

34 changes: 18 additions & 16 deletions build/app.min.js

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions gulp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ module.exports = {
entries: src + '/app/app.js',
dest: dest,
outputName: 'app.js'
},
{
entries: src + '/app/ReactMaterialUiNotifications.js',
dest: dest,
outputName: 'ReactMaterialUiNotifications.js'
}
],
extensions: ['.js'],
Expand Down
15 changes: 15 additions & 0 deletions gulp/tasks/buildComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var gulp = require('gulp');
var babel = require('gulp-babel');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');

gulp.task('buildComponents', function () {
return gulp.src('src/app/ReactMaterialUiNotifications.js')
.pipe(babel())
.pipe(gulp.dest('lib'))
.pipe(rename({
suffix: '.min'
}))
.pipe(uglify())
.pipe(gulp.dest('lib'));
});
13 changes: 0 additions & 13 deletions gulp/tasks/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@ var uglify = require('gulp-uglify');
var pump = require('pump');
var rename = require("gulp-rename");

gulp.task('minify', function(cb) {
pump([
gulp.src('build/ReactMaterialUiNotifications.js'),
uglify(),
rename(function (path) {
path.extname = ".min.js"
}),
gulp.dest('build')
],
cb
);
});

gulp.task('minifyApp', function(cb) {
pump([
gulp.src('build/app.js'),
Expand Down
8 changes: 6 additions & 2 deletions gulp/tasks/release.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// make a release build

var gulp = require('gulp');
var runSequence = require('run-sequence');

gulp.task('release', ['browserify', 'copyImages', 'markup', 'minify', 'minifyApp']);
gulp.task('release', ['browserify', 'copyImages', 'markup', 'buildComponents'], function(done) {
runSequence('minifyApp', function() {
done();
});
});
Loading

0 comments on commit 8376b5e

Please sign in to comment.