windhamdavid 3 years ago
parent
commit
19fd174362
2 changed files with 61 additions and 0 deletions
  1. 38 0
      gulpfile.js
  2. 23 0
      package.json

+ 38 - 0
gulpfile.js

@@ -0,0 +1,38 @@
+var gulp = require('gulp');
+var jshint = require('gulp-jshint');
+var uglify = require('gulp-uglify');
+var minifyHTML = require('gulp-minify-html');
+var minifycss = require('gulp-minify-css');
+var concat = require('gulp-concat');
+var del = require('del');
+
+var hintTask = function () {
+  gulp.src(['*.js', './src/js/**/*.js'])
+    .pipe(jshint('.jshintrc'))
+    .pipe(jshint.reporter('jshint-stylish'));
+  console.log('HINT: Hint Complete');
+};
+
+gulp.task('hint', function() {
+  hintTask();
+});
+
+var buildTask = function() {
+  gulp.src('./src/img/*')
+    .pipe(gulp.dest('./img'));
+  gulp.src('./src/fonts/*')
+    .pipe(gulp.dest('./fonts'));
+  gulp.src(['./src/css/bootstrap-v3.3.6.css', './src/css/style.css'])
+    .pipe(concat('style.min.css'))
+    .pipe(minifycss())
+    .pipe(gulp.dest('./css'));
+  gulp.src(['./src/js/jquery-v2.1.4.js', './src/js/bootstrap-v3.3.6.js'])
+    .pipe(concat('vendor.min.js'))
+    .pipe(uglify())
+    .pipe(gulp.dest('./js'));
+  console.log('BUILD: Build Complete');
+};
+
+gulp.task('build', function() {
+  buildTask();
+});

+ 23 - 0
package.json

@@ -0,0 +1,23 @@
+{
+  "name": "cc-theme",
+  "author": "windhamdavid",
+  "description": "cc-theme",
+  "version": "0.0.1",
+  "private": true,
+  "dependencies": {
+
+  },
+  "devDependencies": {
+    "del": "^2.1.0",
+    "gulp": "^3.9.0",
+    "gulp-concat": "^2.6.0",
+    "gulp-jshint": "^2.0.0",
+    "jshint-stylish": "^2.1.0",
+    "gulp-uglify": "^1.5.1",
+    "gulp-minify-css": "^1.2.1",
+    "gulp-minify-html": "^1.0.4"
+  },
+  "scripts": {
+
+  }
+}