aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--bower.json20
-rw-r--r--gulpfile.js47
-rw-r--r--package.json31
4 files changed, 100 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..26aea3b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+bower_components/*
+node_modules/*
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..db63d0a
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,20 @@
+{
+ "name": "Botleagues Client",
+ "version": "0.0.0",
+ "homepage": "https://github.com/camilstaps/Botleagues",
+ "authors": [
+ "Camil Staps <info@camilstaps.nl>"
+ ],
+ "license": "GPL v3.0",
+ "private": true,
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "bootstrap": "~3.3.2"
+ }
+}
diff --git a/gulpfile.js b/gulpfile.js
new file mode 100644
index 0000000..e777bbc
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,47 @@
+// include gulp
+var gulp = require('gulp');
+
+// include plugins
+var jshint = require('gulp-jshint');
+var changed = require('gulp-changed');
+var minifyHTML = require('gulp-minify-html');
+var concat = require('gulp-concat');
+var stripDebug = require('gulp-strip-debug');
+var uglify = require('gulp-uglify');
+var autoprefix = require('gulp-autoprefixer');
+var minifyCSS = require('gulp-minify-css');
+
+// JS hint task
+gulp.task('jshint', function(){
+ gulp.src('./src/scripts/*.js')
+ .pipe(jshint())
+ .pipe(jshint.reporter('default'));
+});
+
+// minify new/changed HTML
+gulp.task('htmlpage', function(){
+ var src = './src/*.html';
+ var dst = './build';
+ gulp.src(src)
+ .pipe(changed(dst))
+ .pipe(minifyHTML())
+ .pipe(gulp.dest(dst));
+});
+
+// JS concat, strip debugging and minify
+gulp.task('scripts', function(){
+ gulp.src(['./src/scripts/lib.js', './src/scripts/*.js'])
+ .pipe(concat('script.js'))
+ .pipe(stripDebug())
+ .pipe(uglify())
+ .pipe(gulp.dest('./build/scripts'));
+});
+
+// CSS concat, auto-prefix and minify
+gulp.task('styles', function(){
+ gulp.src(['./src/styles/*.css'])
+ .pipe(concat('styles.css'))
+ .pipe(autoprefix('last 2 versions'))
+ .pipe(minifyCSS())
+ .pipe(gulp.dest('./build/styles/'));
+});
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..e5ab04e
--- /dev/null
+++ b/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "Botleagues",
+ "version": "0.0.0",
+ "description": "",
+ "main": ".",
+ "dependencies": {
+ "gulp": "^3.8.11",
+ "gulp-autoprefixer": "^2.1.0",
+ "gulp-changed": "^1.1.1",
+ "gulp-concat": "^2.5.0",
+ "gulp-jshint": "^1.9.2",
+ "gulp-minify-css": "^0.4.5",
+ "gulp-minify-html": "^0.1.8",
+ "gulp-strip-debug": "^1.0.2",
+ "gulp-uglify": "^1.1.0"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/camilstaps/Botleagues"
+ },
+ "author": "Camil Staps <info@camilstaps.nl>",
+ "license": "GPL v3.0",
+ "bugs": {
+ "url": "https://github.com/camilstaps/Botleagues/issues"
+ },
+ "homepage": "https://github.com/camilstaps/Botleagues"
+}