Skip to content

Commit

Permalink
Better build script.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoGonzalez committed Jan 19, 2015
1 parent 0806aa2 commit b370d1d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "blockrain",
"version": "0.1.0",
"description": "Add a game of tetris to your site",
"main": "build/blockrain.jquery.min.js",
"main": "dist/blockrain.jquery.min.js",
"repository": {
"type": "git",
"url": "git://github.com/Aerolab/blockrain.js.git"
Expand All @@ -20,14 +20,12 @@
],
"ignore": [
"assets",
"dist",
"src",
"dist/blockrain.zip",

".gitignore",
"Copyright",
"gulpfile.js",
"index.html",
"LICENSE.txt",
"package.json",

"node_modules",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file modified dist/blockrain.zip
Binary file not shown.
10 changes: 5 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ gulp.task('js', function () {
return gulp.src(['./src/blockrain.jquery.libs.js', './src/blockrain.jquery.src.js', './src/blockrain.jquery.themes.js'])
.pipe(concat('blockrain.jquery.js'))
.pipe(header(getCopyright(), {version: getVersion()}))
.pipe(gulp.dest('./build'))
.pipe(gulp.dest('./dist'))
.pipe(uglify({preserveComments:'none'}))
.pipe(concat('blockrain.jquery.min.js'))
.pipe(header(getCopyright(), {version: getVersion()}))
.pipe(gulp.dest('./build'));
.pipe(gulp.dest('./dist'));
});

gulp.task('css', function () {
// CSS
return gulp.src(['./src/blockrain.css'])
.pipe(gulp.dest('./build'));
.pipe(gulp.dest('./dist'));
});

gulp.task('readme', function () {
// Readme
return gulp.src(['./README.md'])
.pipe(gulp.dest('./build'));
.pipe(gulp.dest('./dist'));
});

gulp.task('dist', function () {
// Create a ZIP File
return gulp.src('./build/*')
return gulp.src(['./dist/blockrain.jquery.js', './dist/blockrain.jquery.min.js', './dist/blockrain.css'])
.pipe(zip('blockrain.zip'))
.pipe(gulp.dest('./dist'));
});
Expand Down

0 comments on commit b370d1d

Please sign in to comment.