Last active
December 17, 2015 02:58
-
-
Save engram-design/5539338 to your computer and use it in GitHub Desktop.
Revisions
-
engram-design revised this gist
May 8, 2013 . 2 changed files with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,12 +4,14 @@ require.config({ jquery: '../vendor/js/libs/jquery', underscore: '../vendor/js/libs/lodash.underscore', backbone: '../vendor/js/libs/backbone', handlebars: '../vendor/js/libs/handlebars', marionette: '../vendor/js/libs/backbone.marionette', text: '../vendor/js/libs/text', hbars: '../vendor/js/libs/hbars' }, shim: { handlebars: { exports: 'Handlebars' }, marionette: { deps: ['jquery', 'underscore', 'backbone'], exports: 'Marionette' This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ module.exports = function(grunt) { grunt.initConfig({ handlebars: { "dist/debug/templates.js": ["app/templates/**/*.html"] }, -
engram-design revised this gist
May 8, 2013 . 1 changed file with 20 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ module.exports = function(grunt) { grunt.initConfig({ handlebars: { "dist/debug/templates.js": ["app/templates/**/*.html"] }, requirejs: { mainConfigFile: "app/config.js", out: "dist/debug/require.js", name: "config", wrap: false, paths: { handlebars: "../vendor/js/libs/handlebars.runtime" } } }); grunt.registerTask("debug", "handlebars requirejs"); }; -
engram-design revised this gist
May 8, 2013 . 4 changed files with 28 additions and 28 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,18 @@ require.config({ deps: ['main'], paths: { jquery: '../vendor/js/libs/jquery', underscore: '../vendor/js/libs/lodash.underscore', backbone: '../vendor/js/libs/backbone', marionette: '../vendor/js/libs/backbone.marionette', text: '../vendor/js/libs/text', hbars: '../vendor/js/libs/hbars' }, shim: { marionette: { deps: ['jquery', 'underscore', 'backbone'], exports: 'Marionette' } } }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,17 +10,17 @@ define(['handlebars'], function(Handlebars) { } else { var JST = window.JST ? window.JST : {}; var path = 'app/' + name + '.html'; // TODO: add path into config options if (JST[path]) { // Grunt.js pre-compiles templates into JST[] onload(Handlebars.template(JST[template])); } else { // use text.js plugin when loading templates during development parentRequire(['text!' + name + '.html'], function(raw) { onload(Handlebars.compile(raw)); }); } } } }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,11 +3,11 @@ define([ ], function(app) { var Module = app.module('Module'); Module.Views = {}; Module.Views.Index = Backbone.Marionette.ItemView.extend({ template: app.templates.ModuleTemplate }); return Module; }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ define(function(require){ return { // Layout/Region templates AppLayout: require('hbars!templates/layout_app'), ModuleTemplate: require('hbars!templates/module_template') }; }); -
engram-design revised this gist
May 8, 2013 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ define([ 'marionette', 'templates' ], function(Marionette, Templates) { var app = new Marionette.Application({ root: '/', templates: Templates }); return app; }); -
engram-design revised this gist
May 8, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ define(function(require){ return { // Layout/Region templates AppLayout: require('hbars!templates/layout_app'), ModuleTemplate: require('hbars!templates/module_template') }; -
engram-design created this gist
May 8, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ define([ 'marionette', 'templates' ], function(Marionette, Templates) { var app = new Marionette.Application({ root: '/', templates: Templates }); return app; }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ require.config({ deps: ['main'], paths: { jquery: '../vendor/js/libs/jquery', underscore: '../vendor/js/libs/lodash.underscore', backbone: '../vendor/js/libs/backbone', marionette: '../vendor/js/libs/backbone.marionette', text: '../vendor/js/libs/text', hbars: '../vendor/js/libs/hbars' }, shim: { marionette: { deps: ['jquery', 'underscore', 'backbone'], exports: 'Marionette' } } }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ define(['handlebars'], function(Handlebars) { var buildMap = {}; return { load: function (name, parentRequire, onload, config) { if (config.isBuild) { var fsPath = config.dirBaseUrl + '/' + name + '.html'; // TODO - add ext into config options buildMap[name] = nodeRequire('fs').readFileSync(fsPath).toString(); onload(); } else { var JST = window.JST ? window.JST : {}; var path = 'app/' + name + '.html'; // TODO: add path into config options if (JST[path]) { // Grunt.js pre-compiles templates into JST[] onload(Handlebars.template(JST[template])); } else { // use text.js plugin when loading templates during development parentRequire(['text!' + name + '.html'], function(raw) { onload(Handlebars.compile(raw)); }); } } } }; }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ define([ 'app' ], function(app) { var Module = app.module('Module'); Module.Views = {}; Module.Views.Index = Backbone.Marionette.ItemView.extend({ template: app.templates.ModuleTemplate }); return Module; }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ define(function(require){ return { // Layout/Region templates AppLayout: require('hbars!templates/layout_app'), ModuleTemplate: require('hbars!templates/module_template') }; });