Skip to content

Commit

Permalink
Added package.json, minified Midnight.JS and gulp task
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Behrends authored and Sergio Behrends committed Sep 29, 2014
1 parent 475bd6a commit 61e890a
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*!
* Midnight.js <%= version %>
* jQuery plugin to switch between multiple fixed header designs on the fly, so it looks in line with the content below it.
* http://aerolab.github.io/midnight.js/
*
* Copyright (c) 2014 Aerolab <[email protected]>
*
* Released under the MIT license
* http://aerolab.github.io/midnight.js/LICENSE.txt
*/

24 changes: 24 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var gulp = require('gulp')
, fs = require('fs')
, uglify = require("gulp-uglify")
, concat = require("gulp-concat")
, header = require("gulp-header");

var getVersion = function () {
info = require("./package.json");
return info.version;
};
var getCopyright = function () {
return fs.readFileSync('Copyright');
};

// task
gulp.task('minifyjs', function () {
gulp.src('./midnight.jquery.js')
.pipe(uglify())
.pipe(header(getCopyright(), {version: getVersion()}))
.pipe(concat('midnight.jquery.min.js'))
.pipe(gulp.dest(''));
});

gulp.task('default', ['minifyjs']);
11 changes: 11 additions & 0 deletions midnight.jquery.min.js

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

21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Midnight.JS",
"version": "1.0.0",
"description": "A jQuery plugin to switch fixed headers on the fly",
"devDependencies": {
"gulp": "^3.8.8",
"gulp-concat": "^2.4.1",
"gulp-header": "^1.1.1",
"gulp-uglify": "^1.0.1"
},
"repository": {
"type": "git",
"url": "https://github.com/Aerolab/midnight.js"
},
"author": "Aerolab",
"license": "MIT",
"bugs": {
"url": "https://github.com/Aerolab/midnight.js/issues"
},
"homepage": "http://aerolab.github.io/midnight.js/"
}

0 comments on commit 61e890a

Please sign in to comment.