Skip to content

Instantly share code, notes, and snippets.

@brettstimmerman
Created April 27, 2011 00:38
Show Gist options
  • Select an option

  • Save brettstimmerman/943498 to your computer and use it in GitHub Desktop.

Select an option

Save brettstimmerman/943498 to your computer and use it in GitHub Desktop.

Revisions

  1. brettstimmerman revised this gist Apr 27, 2011. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -5,12 +5,13 @@
    * yui3-gallery repo.
    *
    * This will override Loader's Gallery configuration. Existing Gallery modules
    * will load locally. Add your new module(s) to the modules list, and presto!
    * will load locally, and your new module should load locally as well.
    *
    * Props to Caridy for helping piece this together.
    */

    YUI_config = {
    lang : [ /* ... */ ], // Required only if testing Lang bundle support.
    groups: {
    gallery: {
    base : './../../build/', // Adjust as necessary.
    @@ -19,6 +20,14 @@ YUI_config = {
    'gallerycss-': { type: 'css' }
    },
    modules: {
    // Adding the full module configuration is a bit overkill, since
    // you should have built your module correctly. However, Loader
    // currently has issues with implicitly loading Lang bundles for
    // Gallery modules when run locally like this. So, I've included
    // the full module configuration here for completeness.
    //
    // You can probably safely drop the whole module config
    // altogether if you don't need to test Lang bundle support.
    'gallery-my-module': {
    path : 'gallery-my-module/gallery-my-module.js',
    requires : [ /* ... */ ], // Optional.
  2. brettstimmerman created this gist Apr 27, 2011.
    35 changes: 35 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    /**
    * Load a YUI Gallery module locally for testing.
    *
    * Assumes you've built your module with ant and have a local copy of the
    * yui3-gallery repo.
    *
    * This will override Loader's Gallery configuration. Existing Gallery modules
    * will load locally. Add your new module(s) to the modules list, and presto!
    *
    * Props to Caridy for helping piece this together.
    */

    YUI_config = {
    groups: {
    gallery: {
    base : './../../build/', // Adjust as necessary.
    patterns: {
    'gallery-' : {},
    'gallerycss-': { type: 'css' }
    },
    modules: {
    'gallery-my-module': {
    path : 'gallery-my-module/gallery-my-module.js',
    requires : [ /* ... */ ], // Optional.
    lang : [ /* ... */ ], // Optional.
    skinnable: true // Optional.
    }
    }
    }
    }
    };

    YUI().use('gallery-my-module', function (Y) {
    // gallery-my-module is available
    });