From 68e10c8998e98ac341142791cad26054d114d5d1 Mon Sep 17 00:00:00 2001 From: Adam Ullman Date: Mon, 3 Mar 2014 11:56:46 +1100 Subject: [PATCH] Cleaning up the package and adding a gulp build script --- .gitignore | 2 ++ gulpfile.js | 12 +++++++ package.json | 32 +++++++++++++++++++ src/{layoutContainer.js => opentok-layout.js} | 2 +- 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 gulpfile.js create mode 100644 package.json rename src/{layoutContainer.js => opentok-layout.js} (99%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..563ba71 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/node_modules +/build \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..e7a8d1e --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,12 @@ +var gulp = require('gulp'), + jshint = require('gulp-jshint'), + rename = require('gulp-rename'), + uglify = require('gulp-uglify'); + +gulp.task('default', function(){ + gulp.src('src/opentok-layout.js') + .pipe(jshint()) + .pipe(uglify()) + .pipe(rename('opentok-layout.min.js')) + .pipe(gulp.dest('./build')); +}); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..0c65c2c --- /dev/null +++ b/package.json @@ -0,0 +1,32 @@ +{ + "name": "opentok-layout-js", + "version": "0.0.1", + "description": "Automatic layout of video elements (publisher and subscriber) minimising white-space for the OpenTok on WebRTC API. This is intended for use with the OpenTok on WebRTC JS API.", + "main": "gulpfile.js", + "dependencies": { + "gulp": "~3.5.5" + }, + "devDependencies": { + "gulp": "~3.5.5", + "gulp-uglify": "~0.2.1", + "gulp-jshint": "~1.5.0", + "gulp-rename": "~1.1.0" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/aullman/opentok-layout-js.git" + }, + "keywords": [ + "opentok", + "webrtc" + ], + "author": "Adam Ullman", + "license": "MIT", + "bugs": { + "url": "https://github.com/aullman/opentok-layout-js/issues" + }, + "homepage": "https://github.com/aullman/opentok-layout-js" +} diff --git a/src/layoutContainer.js b/src/opentok-layout.js similarity index 99% rename from src/layoutContainer.js rename to src/opentok-layout.js index 85bc67b..784a49a 100644 --- a/src/layoutContainer.js +++ b/src/opentok-layout.js @@ -1,4 +1,4 @@ -/** +/*! * opentok-layout-js (http://github.com/aullman/opentok-layout-js) * * Automatic layout of video elements (publisher and subscriber) minimising