diff --git a/README.md b/README.md index 51550a6..d53ac9f 100755 --- a/README.md +++ b/README.md @@ -45,14 +45,17 @@ Add your files to the appropriate `src` subdirectories. Gulp will process and an ``` gulp-boilerplate/ |—— dist/ -| |—— js/ -| | |—— myplugin.js -| | |—— myplugin.min.js | |—— css/ | | |—— myplugin.css | | |—— myplugin.min.css -| |—— static/ -| | |—— # static assets +| |—— js/ +| | |—— bind-polyfill.js +| | |—— bind-polyfill.min.js +| | |—— classList.js +| | |—— classList.min.js +| | |—— myplugin.js +| | |—— myplugin.min.js +| |—— # static assets |—— src/ | |—— js/ | | |—— bind-polyfill.js @@ -92,22 +95,21 @@ Inside `gulpfile.js` you'll see a variable named `paths`. Adjust the paths to su ```js var paths = { - output : 'dist/', - temp: 'src/temp/', - scripts : { - input : [ 'src/js/*' ], - output : 'dist/js/' - }, - styles : { - input : 'src/sass/**/*.scss', - output : 'dist/css/' - }, - static : 'src/static/**', - test : { - spec : [ 'test/spec/**/*.js' ], - coverage: 'test/coverage/', - results: 'test/results/' - } + output : 'dist/', + scripts : { + input : [ 'src/js/*' ], + output : 'dist/js/' + }, + styles : { + input : 'src/sass/**/*.scss', + output : 'dist/css/' + }, + static : 'src/static/**', + test : { + spec : [ 'test/spec/**/*.js' ], + coverage: 'test/coverage/', + results: 'test/results/' + } }; ``` @@ -129,6 +131,9 @@ Gulp Boilerplate is licensed under the [MIT License](http://gomakethings.com/mit Gulp Boilerplate uses [semantic versioning](http://semver.org/). +* v1.0.2 - October 2, 2014 + * Added CommonJS bug fix. + * Updated readme.md to reflect new file structure. * v1.0.1 - September 29, 2014 * Fixed JS concatenation bug. * v1.0.0 - August 31, 2014 diff --git a/dist/css/myplugin.css b/dist/css/myplugin.css index ee0a81b..d82ca2d 100755 --- a/dist/css/myplugin.css +++ b/dist/css/myplugin.css @@ -1,5 +1,5 @@ /** - * gulp-boilerplate v1.0.1 + * gulp-boilerplate v1.0.2 * My Gulp.js boilerplate for creating new web projects, by Chris Ferdinandi. * http://github.com/cferdinandi/Plugin * diff --git a/dist/css/myplugin.css.map b/dist/css/myplugin.css.map index ad0c04e..25dd4f4 100755 --- a/dist/css/myplugin.css.map +++ b/dist/css/myplugin.css.map @@ -1,5 +1,5 @@ /** - * gulp-boilerplate v1.0.1 + * gulp-boilerplate v1.0.2 * My Gulp.js boilerplate for creating new web projects, by Chris Ferdinandi. * http://github.com/cferdinandi/Plugin * diff --git a/dist/css/myplugin.css.min.map b/dist/css/myplugin.css.min.map index 0859736..6359417 100755 --- a/dist/css/myplugin.css.min.map +++ b/dist/css/myplugin.css.min.map @@ -1,2 +1,2 @@ -/** gulp-boilerplate v1.0.1, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ +/** gulp-boilerplate v1.0.2, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ {"version":3,"mappings":"","sources":[],"names":[],"file":"myplugin.css"} \ No newline at end of file diff --git a/dist/css/myplugin.min.css b/dist/css/myplugin.min.css index 37341ce..b505131 100755 --- a/dist/css/myplugin.min.css +++ b/dist/css/myplugin.min.css @@ -1 +1 @@ -/** gulp-boilerplate v1.0.1, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ +/** gulp-boilerplate v1.0.2, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ diff --git a/dist/js/bind-polyfill.js b/dist/js/bind-polyfill.js index 417bcc7..c241fc1 100644 --- a/dist/js/bind-polyfill.js +++ b/dist/js/bind-polyfill.js @@ -1,5 +1,5 @@ /** - * gulp-boilerplate v1.0.1 + * gulp-boilerplate v1.0.2 * My Gulp.js boilerplate for creating new web projects, by Chris Ferdinandi. * http://github.com/cferdinandi/Plugin * diff --git a/dist/js/bind-polyfill.min.js b/dist/js/bind-polyfill.min.js index cf90dc9..3ba23c6 100644 --- a/dist/js/bind-polyfill.min.js +++ b/dist/js/bind-polyfill.min.js @@ -1,2 +1,2 @@ -/** gulp-boilerplate v1.0.1, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ +/** gulp-boilerplate v1.0.2, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ Function.prototype.bind||(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var o=Array.prototype.slice.call(arguments,1),n=this;return fNOP=function(){},fBound=function(){return n.apply(this instanceof fNOP&&t?this:t,o.concat(Array.prototype.slice.call(arguments)))},fNOP.prototype=this.prototype,fBound.prototype=new fNOP,fBound}); \ No newline at end of file diff --git a/dist/js/classList.js b/dist/js/classList.js index 4154d0d..66b34a1 100644 --- a/dist/js/classList.js +++ b/dist/js/classList.js @@ -1,5 +1,5 @@ /** - * gulp-boilerplate v1.0.1 + * gulp-boilerplate v1.0.2 * My Gulp.js boilerplate for creating new web projects, by Chris Ferdinandi. * http://github.com/cferdinandi/Plugin * diff --git a/dist/js/classList.min.js b/dist/js/classList.min.js index 9819c89..361c0e9 100644 --- a/dist/js/classList.min.js +++ b/dist/js/classList.min.js @@ -1,2 +1,2 @@ -/** gulp-boilerplate v1.0.1, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ +/** gulp-boilerplate v1.0.2, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ "document"in self&&!("classList"in document.createElement("_"))&&!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",i=t.Element[n],r=Object,s=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},a=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},o=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},u=function(t,e){if(""===e)throw new o("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new o("INVALID_CHARACTER_ERR","String contains an invalid character");return a.call(t,e)},c=function(t){for(var e=s.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,r=n.length;r>i;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=c[n]=[],h=function(){return new c(this)};if(o[n]=Error[n],l.item=function(t){return this[t]||null},l.contains=function(t){return t+="",-1!==u(this,t)},l.add=function(){var t,e=arguments,n=0,i=e.length,r=!1;do t=e[n]+"",-1===u(this,t)&&(this.push(t),r=!0);while(++ni;i++)e.call(n,t[i],i,t)},s=function(t,e){var n={};return c(t,function(e,r){n[r]=t[r]}),c(e,function(t,r){n[r]=e[r]}),n},u=function(t,e){for(var n=e.charAt(0);t&&t!==document;t=t.parentNode)if("."===n){if(t.classList.contains(e.substr(1)))return t}else if("#"===n){if(t.id===e.substr(1))return t}else if("["===n&&t.hasAttribute(e.substr(1,e.length-2)))return t;return!1},l=function(t){{var e=t.target;u(e,"[data-some-selector]")}};r.destroy=function(){e&&(document.documentElement.classList.remove(e.initClass),document.removeEventListener("click",l,!1),e=null,n=null)};return r.init=function(t){i&&(r.destroy(),e=s(o,t||{}),document.documentElement.classList.add(e.initClass),document.addEventListener("click",l,!1))},r}); \ No newline at end of file +/** gulp-boilerplate v1.0.2, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ +!function(t,e){"function"==typeof define&&define.amd?define("MyPlugin",e(t)):"object"==typeof exports?module.exports=e(t):t.MyPlugin=e(t)}(window||this,function(t){"use strict";var e,n,i={},o=!!document.querySelector&&!!t.addEventListener,r={someVar:123,initClass:"js-myplugin",callbackBefore:function(){},callbackAfter:function(){}},c=function(t,e,n){if("[object Object]"===Object.prototype.toString.call(t))for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(n,t[i],i,t);else for(var o=0,r=t.length;r>o;o++)e.call(n,t[o],o,t)},s=function(t,e){var n={};return c(t,function(e,i){n[i]=t[i]}),c(e,function(t,i){n[i]=e[i]}),n},u=function(t,e){for(var n=e.charAt(0);t&&t!==document;t=t.parentNode)if("."===n){if(t.classList.contains(e.substr(1)))return t}else if("#"===n){if(t.id===e.substr(1))return t}else if("["===n&&t.hasAttribute(e.substr(1,e.length-2)))return t;return!1},l=function(t){{var e=t.target;u(e,"[data-some-selector]")}};i.destroy=function(){e&&(document.documentElement.classList.remove(e.initClass),document.removeEventListener("click",l,!1),e=null,n=null)};return i.init=function(t){o&&(i.destroy(),e=s(r,t||{}),document.documentElement.classList.add(e.initClass),document.addEventListener("click",l,!1))},i}); \ No newline at end of file diff --git a/package.json b/package.json index 5efc16f..999eb93 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "gulp-boilerplate", - "version": "1.0.1", + "version": "1.0.2", "description": "My Gulp.js boilerplate for creating new web projects", + "main": "./dist", "author": { "name": "Chris Ferdinandi", "url": "http://gomakethings.com" diff --git a/src/js/myplugin.js b/src/js/myplugin.js index 8784deb..38e69ff 100755 --- a/src/js/myplugin.js +++ b/src/js/myplugin.js @@ -6,7 +6,7 @@ } else { root.MyPlugin = factory(root); } -})(this, function (root) { +})(window || this, function (root) { 'use strict';