This file contains 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
// Check for Angular/jQuery/Zepto support | |
var jq = | |
!!root.angular && !!angular.element ? angular.element : | |
(!!root.jQuery ? root.jQuery : ( | |
!!root.Zepto ? root.Zepto : null)); | |
// Check for ember | |
var ember = !!root.Ember && typeof root.Ember.addListener === 'function'; | |
// Check for Backbone.Marionette |
This file contains 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
/* global requirejs */ | |
'use strict'; | |
var LIVERELOAD_PORT = 35729; | |
var SERVER_PORT = 9000; | |
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT}); | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
// # Globbing |
This file contains 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
[master:!][chet@Chets-MacBook-Pro:/Applications/MAMP/htdocs/WebSites/jsdoccer] | |
[22:22:18] $ node document.js | |
Generating syntax tree: input/js/example.js | |
Saving syntax tree: output/example.json | |
func | |
arg1 | |
arg2 | |
answer |
This file contains 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
[master:!?][chet@Chets-MacBook-Pro:/Applications/MAMP/htdocs/WebSites/jsdoccer] | |
[16:22:19] $ node document.js | |
Generating syntax tree: input/js/example.js | |
Saving syntax tree: output/example.json | |
[] | |
Generating syntax tree: input/js/marionette.application.js | |
Saving syntax tree: output/marionette.application.json | |
[ { namespace: 'Marionette', | |
functionName: 'Application', | |
params: [ 'options' ] } ] |
This file contains 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
so like here is my crude config | |
``` | |
var typeMap = { | |
Program: { | |
parseTags: ['body'], | |
documentTags: [] | |
}, | |
ExpressionStatement: { | |
parseTags: ['expression'], |
This file contains 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
'use strict'; | |
var EventEmitter = require('events').EventEmitter, | |
globalChannel = new EventEmitter(), | |
Rx = require('rx'), | |
nutrients = require('./food-objects/nutrients'), | |
nutrients, | |
defaultHandlers = { | |
onError: function (err) { |
This file contains 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
{"title":"Anonymous Gistbook","author":"ChetHarrison","pages":[{"pageName":"","sections":[{"type":"text","source":"Welcome to Gistbook!"},{"type":"html","source":"<!-- template.html -->\n<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <title>Table</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <script src=\"http://fb.me/react-0.12.1.js\"></script>\n <script src=\"http://fb.me/JSXTransformer-0.12.1.js\"></script>\n <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css\">\n</head>\n\n<body>\n <div id=\"content\" class=\"container-fluid\">Table</div>\n <script type=\"text/jsx\" src='table.jsx'></sript>\n</body>\n\n</html>"},{"type":"javascript","source":"/** @jsx React.DOM */\n'use strict';\n\nvar Table = React.createClass({\n\t\n\trender: function() {\n\t\tvar rows = [];\n\t\t\n\t\tthis.props.datas.forEach(function(data) {\n\t\t\trows.push(<TableRow data={data} key={data.key} />)\n\t\t})\n\t\t\t\n\t\tretur |
This file contains 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
// simple example of the decorator pattern. | |
'use strict'; | |
var doccer = { | |
init: function(options) { | |
options = options || {}; | |
this.src = options.src; | |
this.decorators = options.decorators; | |
}, | |
This file contains 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
'use strict'; | |
var fs = require('fs'), | |
path = require('path'), | |
jsToAst = require('./src/parsers/js-to-ast.js'), | |
https = require('https'), | |
rawGitScrUrl = 'https://rawgit.com/marionettejs/backbone.marionette/master/src/', | |
get, srcFileList, options; | |
This file contains 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
'use strict'; | |
var fs = require('fs'), | |
path = require('path'), | |
jsToAst = require('./src/parsers/js-to-ast.js'), | |
https = require('https'), | |
rawGitScrUrl = 'https://rawgit.com/marionettejs/backbone.marionette/master/src/', | |
get, srcFileList, options; | |
OlderNewer