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 characters
| 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 |
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 characters
| paths: { | |
| "log": "utils/logrjs", | |
| "hbs": "../repo/hbs/hbs", | |
| "i18nprecompile": "../repo/hbs/i18nprecompile", | |
| "json2": "../repo/hbs/json2", | |
| "handlebars": "../repo/hbs/Handlebars", | |
| "hbs/underscore": "../repo/underscore/underscore", | |
| "underscore": "../repo/underscore/underscore", | |
| "assert": "../repo/assert/assert", |
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 characters
| // RxJs example using Marionette events | |
| // Originally wrote by https://github.com/ChetHarrison - I couldn't find that gist on his profile | |
| //It's using AMD(requirejs) | |
| // eventable.js | |
| // A base class to strap events onto an object | |
| define(['rx', 'marionette'], function(Rx, Marionette) { | |
| 'use strict'; |
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 characters
| // example using the raf module from npm. try changing some values! | |
| var Marionette = require('marionette-browserify'); | |
| app = new Marionette.Application(); | |
| app.on('start', function() { | |
| console.log('hey'); | |
| }); | |
| app.start(); |
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 characters
| //In this shim | |
| //1. Add jquery dependency to marionette | |
| //2. Substitute Wreqr to Backbone.Radio (https://github.com/marionettejs/backbone.radio) | |
| //3. Substitute underscore to lodash | |
| (function(root, factory) { | |
| var $ = require('jquery'); | |
| var Backbone = require('backbone'); | |
| Backbone.$ = $; |
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 characters
| // example using the raf module from npm. try changing some values! | |
| var requestAnimationFrame = require("raf") | |
| var canvas = document.createElement("canvas") | |
| canvas.width = 500 | |
| canvas.height = 500 | |
| document.body.appendChild(canvas) | |
| var context = canvas.getContext("2d") |
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 characters
| // example using the raf module from npm. try changing some values! | |
| $ = require('jquery'); | |
| Backbone = require('backbone'); | |
| Backbone.$ = $; | |
| Marionette = require('backbone.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 characters
| gulp.task 'convert_to_po', -> | |
| name_organization = 'test' | |
| srcdir = './src/locales/en-US/' | |
| namespaces = fs.readdirSync(srcdir) | |
| #Here I will get an array of files ['global.po', 'login.po'] | |
| locale = 'en_US' | |
| #create .tx/ folder by yourself | |
| stream = fs.createWriteStream './tx/config' |
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 characters
| TodoMVC.module 'TodoApp', (App, TodoMVC, Backbone, Marionette, $, _) -> | |
| log arguments | |
| class App.TodoForm extends Marionette.ItemView | |
| events: | |
| 'keypress #new-todo' : 'createOnEnter' | |
| 'click .mark-all-done' : 'toggleAllClicked' | |
| triggers: | |
| 'click .todo-clear a' : 'clear:completed' |
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 characters
| #!/usr/bin/env node | |
| var exec = require('child-process-promise').exec; | |
| var fs = require('fs'); | |
| var path = require('path'); | |
| var sys = require('sys'); | |
| var cordova = require('cordova'); | |
| var pluginlist = [ | |
| "de.appplant.cordova.plugin.email-composer", | |
| "org.apache.cordova.globalization", |
NewerOlder