diff --git a/Generic_Starter/gulp-config.js b/Generic_Starter/gulp-config.js index 674eec7..e5ce97f 100644 --- a/Generic_Starter/gulp-config.js +++ b/Generic_Starter/gulp-config.js @@ -3,12 +3,12 @@ const env = require('./gulp-env')(); module.exports = () => { const config = { html: { - source: `${env.srcPath}/**/*.{html, htm, php}`, + source: `${env.srcPath}/**/*.{html,htm,php,cshtml}`, lintPath: `${env.srcPath}/`, build: `${env.buildPath}/` }, styles: { - source: `${env.srcPath}/styles/**/*.{scss, sass, css}`, + source: `${env.srcPath}/styles/**/*.{scss,sass,css}`, lintPath: `${env.srcPath}/styles/`, build: `${env.buildPath}/styles/` }, @@ -18,7 +18,7 @@ module.exports = () => { build: `${env.buildPath}/scripts/` }, images: { - source: `${env.srcPath}/images/**/*.{jpg, JPG, jpeg, JPEG, png, PNG, gif, GIF, svg}`, + source: `${env.srcPath}/images/**/*.{jpg,JPG,jpeg,JPEG,png,PNG,gif,GIF,svg}`, build: `${env.buildPath}/images/` }, browserSync: { @@ -46,7 +46,7 @@ module.exports = () => { plugins: ['transform-object-rest-spread'] }, sass: { - outputStyle: 'compressed' // 'expanded' + outputStyle: 'compressed' }, formatting: { 'indent_size': 4, @@ -174,7 +174,7 @@ module.exports = () => { }, sass: { options: { - formatter: 'stylish', + 'formatter': 'stylish', 'merge-default-rules': true }, rules: { @@ -207,56 +207,6 @@ module.exports = () => { 'single-line-per-selector': 0, 'force-pseudo-nesting': 0 } - }, - html: { - rules: { - "attr-bans": 0, - "attr-name-ignore-regex": 0, - "attr-name-style": 0, - "attr-new-line": 0, - "attr-no-dup": 0, - "attr-no-unsafe-char": 0, - "attr-order": 0, - "attr-quote-style": 0, - "attr-req-value": 0, - "class-no-dup": 0, - "class-style": 0, - "doctype-first": 0, - "doctype-html5": 0, - "fig-req-figcaption": 0, - "focusable-tabindex-style": 0, - "head-req-title": 0, - "head-valid-content-model": 0, - "href-style": 0, - "html-req-lang": 0, - "html-valid-content-model": 0, - "id-class-ignore-regex": 0, - "id-class-no-ad": 0, - "id-class-style": 0, - "id-no-dup": 0, - "img-req-alt": 0, - "img-req-src": 0, - "indent-style": 0, - "indent-width": 0, - "indent-width-cont": 0, - "input-radio-req-name": 0, - "input-req-label": 0, - "label-req-for": 0, - "lang-style": 0, - "line-end-style": 0, - "line-max-len": 0, - "line-max-len-ignore-regex": 0, - "spec-char-escape": 0, - "table-req-caption": 0, - "table-req-header": 0, - "tag-bans": 0, - "tag-close": 0, - "tag-name-lowercase": 0, - "tag-name-match": 0, - "tag-self-close": 0, - "title-max-len": 0, - "title-no-dup": 0 - } } } } diff --git a/Generic_Starter/gulpfile.js b/Generic_Starter/gulpfile.js index abf10f6..173cd8a 100644 --- a/Generic_Starter/gulpfile.js +++ b/Generic_Starter/gulpfile.js @@ -4,6 +4,7 @@ const env = require('./gulp-env')(); const browserSync = require('browser-sync').create(); const runSequence = require('run-sequence').use(gulp); const $ = require('gulp-load-plugins')({ lazy: true }); +const del = require('del'); //////////////// // Default Tasks @@ -12,12 +13,22 @@ gulp.task('help', $.taskListing); /////////////// // Global Jobs -gulp.task('__start-local__', ['task:compile-styles', 'task:compile-scripts', 'task:compile-html', 'task:compile-images', 'task:start-watch']); -gulp.task('__compile-assets__', ['task:compile-styles', 'task:compile-scripts', 'task:compile-html', 'task:compile-images']); -gulp.task('__lint-everything__', ['_lint-styles_', '_lint-scripts_']); +gulp.task('__start-local__', () => { + runSequence('clean:build', 'task:compile-styles', 'task:compile-scripts', 'task:compile-html', 'task:compile-images', 'task:start-watch'); +}); +gulp.task('__compile-assets__', () => { + runSequence('clean:build', 'task:compile-styles', 'task:compile-scripts', 'task:compile-html', 'task:compile-images'); +}); +gulp.task('__lint-everything__', () => { + runSequence('_lint-styles_', '_lint-scripts_'); +}); //////////////// // Local Tasks +gulp.task('clean:build', () => { + return del([env.buildPath]); +}); + gulp.task('task:compile-styles', () => { return gulp .src(config.styles.source) @@ -133,7 +144,7 @@ gulp.task('lint:js', () => { /////////////////////////// function errorHandler() { return $.plumber({ - errorHandler: function (err) { + errorHandler: function(err) { $.notify.onError({ title: `Error : ${err.plugin}`, message: `Issue : ${err}`, diff --git a/Generic_Starter/package-lock.json b/Generic_Starter/package-lock.json index a6addf4..305d250 100644 --- a/Generic_Starter/package-lock.json +++ b/Generic_Starter/package-lock.json @@ -1908,18 +1908,25 @@ } }, "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", "dev": true, "requires": { - "globby": "^5.0.0", + "globby": "^6.1.0", "is-path-cwd": "^1.0.0", "is-path-in-cwd": "^1.0.0", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", "rimraf": "^2.2.8" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "delayed-stream": { @@ -2992,6 +2999,37 @@ "del": "^2.0.2", "graceful-fs": "^4.1.2", "write": "^0.2.1" + }, + "dependencies": { + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + } + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + } } }, "follow-redirects": { @@ -3131,12 +3169,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3151,17 +3191,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3278,7 +3321,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3290,6 +3334,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3304,6 +3349,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3311,12 +3357,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -3335,6 +3383,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3415,7 +3464,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3427,6 +3477,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3548,6 +3599,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3871,13 +3923,12 @@ "dev": true }, "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "dev": true, "requires": { "array-union": "^1.0.1", - "arrify": "^1.0.0", "glob": "^7.0.3", "object-assign": "^4.0.1", "pify": "^2.0.0", @@ -5120,23 +5171,6 @@ "lodash.isfinite": "^3.3.2" } }, - "is-odd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-2.0.0.tgz", - "integrity": "sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ==", - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", @@ -5941,9 +5975,9 @@ "dev": true }, "nanomatch": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.9.tgz", - "integrity": "sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA==", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -5951,7 +5985,6 @@ "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "fragment-cache": "^0.2.1", - "is-odd": "^2.0.0", "is-windows": "^1.0.2", "kind-of": "^6.0.2", "object.pick": "^1.3.0", @@ -6480,6 +6513,12 @@ "p-limit": "^1.1.0" } }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "dev": true + }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", diff --git a/Generic_Starter/package.json b/Generic_Starter/package.json index ee0a81c..bad5b1b 100644 --- a/Generic_Starter/package.json +++ b/Generic_Starter/package.json @@ -3,13 +3,14 @@ "version": "1.0.0", "description": "A generic starting structure for simple sites. This is also meant to be a good starting point for more complex sites that have different file structures. Feel free to augment and adopt to your situation.", "main": "index.js", - "author": "Jermbo", + "author": "Jeremy 'Jermbo' Lawson", "license": "MIT", "devDependencies": { "babel-cli": "^6.26.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-preset-env": "^1.7.0", "browser-sync": "^2.24.4", + "del": "^3.0.0", "gulp": "^3.9.1", "gulp-autoprefixer": "^5.0.0", "gulp-babel": "^7.0.1", diff --git a/PHP_Starter_Gulp/package.json b/PHP_Starter_Gulp/package.json index 634b821..727c45c 100644 --- a/PHP_Starter_Gulp/package.json +++ b/PHP_Starter_Gulp/package.json @@ -1,9 +1,9 @@ { - "name": "elysee", + "name": "wordpress-generic-starter", "version": "1.0.0", "description": "Final Site Build", "main": "index.js", - "author": "Cosmic Strawberry", + "author": "Jeremy 'Jermbo' Lawson", "license": "MIT", "devDependencies": { "babel-cli": "^6.26.0",