Skip to content

Instantly share code, notes, and snippets.

@rxaviers
Created April 2, 2013 20:37
Show Gist options
  • Select an option

  • Save rxaviers/5295947 to your computer and use it in GitHub Desktop.

Select an option

Save rxaviers/5295947 to your computer and use it in GitHub Desktop.
commit fd8a2c71e95057ce425f9b5abb429d0c9085a5ee
Author: Rafael Xavier de Souza <[email protected]>
Date: Tue Apr 2 17:18:29 2013 -0300
If effect core is selected, include addClass, animate, hide, removeClass, show, switchClass, toggle, and toggleClass demos
diff --git a/lib/builder.js b/lib/builder.js
index f11a9c8..49a9b46 100644
--- a/lib/builder.js
+++ b/lib/builder.js
@@ -169,6 +169,7 @@ Builder.prototype = {
});
});
},
+ adhocDemosRe = /addClass|animate|hide|removeClass|show|switchClass|toggle|toggleClass/,
basedir = this.basedir,
build = [],
bundleCss = function( allCss, theme, options ) {
@@ -319,6 +320,12 @@ Builder.prototype = {
if ( components.indexOf( "datepicker" ) >= 0 ) {
[ "ui/i18n/jquery-ui-i18n.js", "ui/minified/i18n/jquery-ui-i18n.min.js" ].forEach( addEach );
}
+ if ( components.indexOf( "effect" ) >= 0 ) {
+ files.demoFiles.filter(function( filepath ) {
+ var componentSubdir = filepath.split( "/" )[ 1 ];
+ return adhocDemosRe.test( componentSubdir );
+ }).forEach( addEach );
+ }
if ( components.indexOf( "effect-scale" ) >= 0 && !options.skipDocs) {
[ "docs/puff-effect.html", "docs/size-effect.html" ].forEach( addEach );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment