Original author: @gpetrov
Original source: rogerwang/node-webkit/#149 (comment)
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
$ npm --verbose --save install babel-core | |
npm info it worked if it ends with ok | |
npm verb cli [ 'node', | |
npm verb cli '/Users/sbruchmann/.npm-packages/bin/npm', | |
npm verb cli '--verbose', | |
npm verb cli '--save', | |
npm verb cli 'install', | |
npm verb cli 'babel-core' ] | |
npm info using [email protected] | |
npm info using [email protected] |
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
* { | |
box-sizing: border-box; | |
} | |
*::before, | |
*::after { | |
box-sizing: inherit; | |
} | |
.container { |
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
define(function (require) { | |
"use strict"; | |
var AppInit = brackets.getModule("utils/AppInit"); | |
var DefaultDialogs = brackets.getModule("widgets/DefaultDialogs"); | |
var Dialogs = brackets.getModule("widgets/Dialogs"); | |
AppInit.appReady(function _onAppReady() { | |
var myDialog = Dialogs.showModalDialog( | |
DefaultDialogs.DIALOG_ID_INFO, |
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
define(function () { | |
"use strict"; | |
var CommandManager = brackets.getModule("command/CommandManager"), | |
Commands = brackets.getModule("command/Commands"), | |
Menus = brackets.getModule("command/Menus"); | |
var MY_COMMAND_ID = "PDFEXPORT"; | |
function exportAsPDF() { |
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
define(function () { | |
"use strict"; | |
var AppInit = brackets.getModule("utils/AppInit"), | |
FileSystem = brackets.getModule("filesystem/FileSystem"), | |
ProjectManager = brackets.getModule("project/ProjectManager"); | |
AppInit.appReady(function () { | |
var filename = ProjectManager.getProjectRoot().fullPath + "hello-world.txt"; | |
FileSystem.getFileForPath(filename).write("Hello world!\n"); |
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
define(function () { | |
"use strict"; | |
$("#main-toolbar").hide(); | |
}); |
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
// Original code by David Walsh: http://davidwalsh.name/pubsub-javascript | |
var events = (function(){ | |
var topics = {}; | |
return { | |
subscribe: function(topic, listener) { | |
// Create the topic's object if not yet created | |
if(!topics[topic]) topics[topic] = { queue: [] }; | |
// Add the listener to queue |
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
'use strict'; | |
var feathers = require('feathers'); | |
var rubberduck = require('rubberduck'); | |
var tasks = []; | |
var emitter = rubberduck.emitter(tasks).punch('push'); | |
emitter.on('beforePush', function(args, instance) { | |
console.log(new Date(), 'About to push ' + args[0]); |
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
/* Based on http://goldengridsystem.com */ | |
.col { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
float: left; | |
padding-left: 0.75em; | |
padding-right: 0.75em; | |
} |
NewerOlder