This is a quick example of taking a config file (example.js), and running jscombine.js. It will bundle up regular scripts as well as templates (hard coded to use doT). Compiled templates are automatically added to a "templates" property on the given namespace (ns key in the example file), keyed by a slightly transformed version of their filename.
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
var jsdom = require('jsdom@0.2.0') | |
,fs = require('fs') | |
,testHtml = fs.readFileSync(__dirname + '/british_throne.html', 'utf8') | |
,html5 = require('html5') | |
,window | |
,document | |
,start = +new Date() | |
,end; | |
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
$(function(){ | |
App = Spine.Controller.create({ | |
el: $('body') | |
,elements: { | |
'#home': '$home' | |
,'#step-1': '$step1' | |
,'#step-2': '$step2' |
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
flashAvail({ waitFor: 10000 }) | |
.done( function(result){ | |
if(result.flashBlocked === false){ | |
// do whatever you need flash for | |
} else { | |
// flash is installed but blocked. present messaging | |
alert('Oops!', | |
'It appears that Flash is being blocked. \ | |
Flash is required for Grill Circle and Facebook. \ | |
Please enable it and refresh the page.'); |
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
#include <stdint.h> | |
#include <QtCore/QtGlobal> | |
#if defined(MYSHAREDLIB_LIBRARY) | |
# define MYSHAREDLIB_EXPORT Q_DECL_EXPORT | |
#else | |
# define MYSHAREDLIB_EXPORT Q_DECL_IMPORT | |
#endif | |
MYSHAREDLIB_EXPORT uint64_t factorial(int max) { |
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
var events = require('events') | |
,util = require('util') | |
,_ = require('underscore') | |
,http = require('http') | |
function StreamConsumer(options){ | |
events.EventEmitter.call(this); | |
this.reEot = /.+\r\n/gm; | |
this.req = null; |
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
/*********** Resets */ | |
div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, | |
pre, form, fieldset, input, textarea, p, blockquote, th, td { margin: 0; padding: 0; } | |
fieldset, img { border: 0; } | |
table { border-collapse: collapse; border-spacing: 0; } | |
ol, ul { list-style: none; } | |
address, caption, cite, code, dfn, em, strong, th, var { font-weight: normal; font-style: normal; } | |
caption, th { text-align: left; } | |
h1, h2, h3, h4, h5, h6 { font-weight: normal; font-size: 100%;} | |
q:before, q:after { content: ''; } |
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
@font-face { | |
font-family: 'NevisBold'; | |
src: url('../font/nevis-webfont.eot'); | |
src: url('../font/nevis-webfont.eot?#iefix') format('embedded-opentype'), | |
url('../font/nevis-webfont.woff') format('woff'), | |
url('../font/nevis-webfont.ttf') format('truetype'), | |
url('../font/nevis-webfont.svg#nevisBold') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Andrew Petersen <http://kirbysayshi.github.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
Copyright 2011 Kristopher Michael Kowal. All rights reserved. | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to | |
deal in the Software without restriction, including without limitation the | |
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
sell copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in | |
all copies or substantial portions of the Software. |