diff --git a/.gitignore b/.gitignore index 55e837b..c82bfc9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ www/wp-content/uploads/ www/wp-content/plugins/hello.php +www/wp-content/themes/ation2016/node_modules/ .DS_Store .idea .vagrant/ \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/gulpfile.js b/www/wp-content/themes/ation2016/gulpfile.js new file mode 100644 index 0000000..539eb08 --- /dev/null +++ b/www/wp-content/themes/ation2016/gulpfile.js @@ -0,0 +1,53 @@ +var gulp = require('gulp'), + plumber = require('gulp-plumber'), + rename = require('gulp-rename'); +var autoprefixer = require('gulp-autoprefixer'); +var concat = require('gulp-concat'); +var jshint = require('gulp-jshint'); +var uglify = require('gulp-uglify'); +var imagemin = require('gulp-imagemin'), + cache = require('gulp-cache'); +var minifycss = require('gulp-minify-css'); +var sass = require('gulp-sass'); + +gulp.task('images', function(){ + gulp.src('src/images/**/*') + .pipe(cache(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true }))) + .pipe(gulp.dest('static/images/')); +}); + +gulp.task('styles', function(){ + gulp.src(['src/styles/**/*.scss']) + .pipe(plumber({ + errorHandler: function (error) { + console.log(error.message); + this.emit('end'); + }})) + .pipe(sass()) + .pipe(autoprefixer('last 2 versions')) + .pipe(gulp.dest('static/styles/')) + .pipe(rename({suffix: '.min'})) + .pipe(minifycss()) + .pipe(gulp.dest('static/styles/')) +}); + +gulp.task('scripts', function(){ + return gulp.src('src/scripts/**/*.js') + .pipe(plumber({ + errorHandler: function (error) { + console.log(error.message); + this.emit('end'); + }})) + .pipe(jshint()) + .pipe(jshint.reporter('default')) + .pipe(concat('main.js')) + .pipe(gulp.dest('static/scripts/')) + .pipe(rename({suffix: '.min'})) + .pipe(uglify()) + .pipe(gulp.dest('static/scripts/')) +}); + +gulp.task('default', ['styles', 'scripts'], function(){ + gulp.watch("src/styles/**/*.scss", ['styles']); + gulp.watch("src/scripts/**/*.js", ['scripts']); +}); \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/package.json b/www/wp-content/themes/ation2016/package.json new file mode 100644 index 0000000..c365f60 --- /dev/null +++ b/www/wp-content/themes/ation2016/package.json @@ -0,0 +1,33 @@ +{ + "name": "ation2016", + "version": "1.0.0", + "description": "2016 Theme for ATION Digital Media.", + "main": "gulpfile.js", + "directories": { + "test": "tests" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.uconn.edu/dmd-web-and-mobile/ationframework" + }, + "author": "ATION", + "license": "ISC", + "devDependencies": { + "browser-sync": "^2.11.1", + "gulp": "^3.9.1", + "gulp-autoprefixer": "^3.1.0", + "gulp-cache": "^0.4.2", + "gulp-concat": "^2.6.0", + "gulp-imagemin": "^2.4.0", + "gulp-jshint": "^2.0.0", + "gulp-minify-css": "^1.2.3", + "gulp-plumber": "^1.1.0", + "gulp-rename": "^1.2.2", + "gulp-sass": "^2.2.0", + "gulp-uglify": "^1.5.2", + "jshint": "^2.9.1" + } +} diff --git a/www/wp-content/themes/ation2016/src/scripts/main.js b/www/wp-content/themes/ation2016/src/scripts/main.js new file mode 100644 index 0000000..1e7abfb --- /dev/null +++ b/www/wp-content/themes/ation2016/src/scripts/main.js @@ -0,0 +1,5 @@ +jQuery( document ).ready( function( $ ) { + + // Meow + +}); \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/src/styles/site.scss b/www/wp-content/themes/ation2016/src/styles/site.scss new file mode 100644 index 0000000..1b9729e --- /dev/null +++ b/www/wp-content/themes/ation2016/src/styles/site.scss @@ -0,0 +1,5 @@ +$orange: orange; + +.menu { + color: $orange; +} \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/static/scripts/main.js b/www/wp-content/themes/ation2016/static/scripts/main.js new file mode 100644 index 0000000..1e7abfb --- /dev/null +++ b/www/wp-content/themes/ation2016/static/scripts/main.js @@ -0,0 +1,5 @@ +jQuery( document ).ready( function( $ ) { + + // Meow + +}); \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/static/scripts/main.min.js b/www/wp-content/themes/ation2016/static/scripts/main.min.js new file mode 100644 index 0000000..b2b9856 --- /dev/null +++ b/www/wp-content/themes/ation2016/static/scripts/main.min.js @@ -0,0 +1 @@ +jQuery(document).ready(function(e){}); \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/static/styles/site.css b/www/wp-content/themes/ation2016/static/styles/site.css new file mode 100644 index 0000000..64b8995 --- /dev/null +++ b/www/wp-content/themes/ation2016/static/styles/site.css @@ -0,0 +1,2 @@ +.menu { + color: orange; } diff --git a/www/wp-content/themes/ation2016/static/styles/site.min.css b/www/wp-content/themes/ation2016/static/styles/site.min.css new file mode 100644 index 0000000..d619bda --- /dev/null +++ b/www/wp-content/themes/ation2016/static/styles/site.min.css @@ -0,0 +1 @@ +.menu{color:orange} \ No newline at end of file