Skip to content

Commit 61e890a

Browse files
Sergio BehrendsSergio Behrends
authored andcommitted
Added package.json, minified Midnight.JS and gulp task
1 parent 475bd6a commit 61e890a

File tree

4 files changed

+67
-0
lines changed

4 files changed

+67
-0
lines changed

Copyright

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*!
2+
* Midnight.js <%= version %>
3+
* jQuery plugin to switch between multiple fixed header designs on the fly, so it looks in line with the content below it.
4+
* http://aerolab.github.io/midnight.js/
5+
*
6+
* Copyright (c) 2014 Aerolab <[email protected]>
7+
*
8+
* Released under the MIT license
9+
* http://aerolab.github.io/midnight.js/LICENSE.txt
10+
*/
11+

gulpfile.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
var gulp = require('gulp')
2+
, fs = require('fs')
3+
, uglify = require("gulp-uglify")
4+
, concat = require("gulp-concat")
5+
, header = require("gulp-header");
6+
7+
var getVersion = function () {
8+
info = require("./package.json");
9+
return info.version;
10+
};
11+
var getCopyright = function () {
12+
return fs.readFileSync('Copyright');
13+
};
14+
15+
// task
16+
gulp.task('minifyjs', function () {
17+
gulp.src('./midnight.jquery.js')
18+
.pipe(uglify())
19+
.pipe(header(getCopyright(), {version: getVersion()}))
20+
.pipe(concat('midnight.jquery.min.js'))
21+
.pipe(gulp.dest(''));
22+
});
23+
24+
gulp.task('default', ['minifyjs']);

midnight.jquery.min.js

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "Midnight.JS",
3+
"version": "1.0.0",
4+
"description": "A jQuery plugin to switch fixed headers on the fly",
5+
"devDependencies": {
6+
"gulp": "^3.8.8",
7+
"gulp-concat": "^2.4.1",
8+
"gulp-header": "^1.1.1",
9+
"gulp-uglify": "^1.0.1"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/Aerolab/midnight.js"
14+
},
15+
"author": "Aerolab",
16+
"license": "MIT",
17+
"bugs": {
18+
"url": "https://github.com/Aerolab/midnight.js/issues"
19+
},
20+
"homepage": "http://aerolab.github.io/midnight.js/"
21+
}

0 commit comments

Comments
 (0)