Skip to content

Commit

Permalink
Setting up the playground.
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Oct 11, 2014
0 parents commit 2fb5a79
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/bower_components
/node_modules
/coverage
.npmrc
.DS_Store
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2014, Gajus Kuizinas (http://gajus.com/)
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Table of Contents Generator

40 changes: 40 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
var pkg = require('./package.json'),
karma = require('karma').server,
gulp = require('gulp'),
gutil = require('gulp-util'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
header = require('gulp-header'),
del = require('del');

gulp.task('clean', function (cb) {
del(['dist'], cb);
});

gulp.task('version', function () {
// @todo Update jQuery/bower json version and dependencies
});

gulp.task('distribute', ['clean'],function () {
return gulp
.src('./src/contents.js')
.pipe(gulp.dest('./dist/'))
.pipe(uglify())
.pipe(rename('contents.min.js'))
.pipe(header('/**\n* @version <%= pkg.version %>\n* @link https://github.com/gajus/contents for the canonical source repository\n* @license https://github.com/gajus/contents/blob/master/LICENSE BSD 3-Clause\n*/\n', {pkg: pkg}))
.pipe(gulp.dest('./dist/'))
.on('error', gutil.log);
});

gulp.task('travis', ['default'], function (cb) {
karma.start({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, cb);
});

gulp.task('watch', function () {
gulp.watch('./src/contents.js', ['default']);
});

gulp.task('default', ['distribute']);
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "contents",
"private": true,
"dependencies": {
"jquery": "^1"
},
"devDependencies": {
"karma": "^0.12.22",
"karma-jasmine": "~0.2.2",
"gulp": "^3.8.7",
"gulp-util": "^3.0.0",
"gulp-uglify": "^0.3.1",
"gulp-rename": "^1.2.0",
"gulp-header": "^1.0.5",
"del": "^0.1.2",
"karma-phantomjs-launcher": "^0.1.4",
"karma-html2js-preprocessor": "^0.1.0"
}
}
Empty file added src/concents.js
Empty file.

0 comments on commit 2fb5a79

Please sign in to comment.