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
[].filter || (Array.prototype.filter = // Use the native array filter method, if available. | |
function(a, //a function to test each value of the array against. Truthy values will be put into the new array and falsy values will be excluded from the new array | |
b, // placeholder | |
c, // placeholder | |
d, // placeholder | |
e // placeholder | |
) { | |
c = this; // cache the array | |
d = []; // array to hold the new values which match the expression | |
for (e in c) // for each value in the array, |
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 magicHook = require('magic-hook'); | |
function Logger() { | |
magicHook(this, ['log']); | |
} | |
Logger.prototype.log = function(msg) { | |
console.log(msg); |
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 registerPlugin = require('register-plugin'); | |
var domify = require('domify') | |
function helloWorld(app, options, next) { | |
app.sayIt = function() { | |
document.body.appendChild(domify('Hello world!')); | |
}; | |
next(); | |
} |
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
start: "node app" | |
test: "gulp test" | |
docker: | |
build: "docker-compose build" | |
run: "docker-compose up" | |
docs: | |
clean: "rimraf _book" | |
prepare: "gitbook install" | |
build: | |
- "zx docs:prepare" |
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
server.route.pre(function(next, opts) { | |
if (!opts.config.passport) return next(opts); | |
if (opts.config.passport.authenticate) { | |
opts.handler = [ | |
function(req, res, next) { | |
var passportOpts = opts.config.passport.authenticate[req.params.provider] || | |
opts.config.passport.authenticate.default; | |
passport.authenticate(req.params.provider, passportOpts)(req, res, next); | |
}, |
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'; | |
module.exports = createApp; | |
var createElement = require('virtual-dom/create-element'); | |
var diff = require('virtual-dom/diff'); | |
var patch = require('virtual-dom/patch'); | |
function createApp(mount) { | |
var tree; | |
var node; |
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
Could not start watchman; falling back to NodeWatcher for file system events. | |
Visit http://ember-cli.com/user-guide/#watchman for more info. | |
10% building modules 4/6 modules 2 active ...re/[email protected]/_/addStyles.jsTypeError: Cannot read property 'directoryExists' of undefined | |
at Object.getAutomaticTypeDirectiveNames (/home/zkochan/src/test/issue394/node_modules/.store/[email protected]/_/lib/typescript.js:43865:17) | |
at State.loadTypesFromConfig (/home/zkochan/src/test/issue394/node_modules/.store/[email protected]/_/src/host.ts:150:36) | |
at new State (/home/zkochan/src/test/issue394/node_modules/.store/[email protected]/_/src/host.ts:144:14) | |
at Object.ensureInstance (/home/zkochan/src/test/issue394/node_modules/.store/[email protected]/_/src/instance.ts:150:19) | |
at compiler (/home/zkochan/src/test/issue394/node_modules/.store/[email protected]/_/src/index.ts:37:20) | |
at Object.loader (/home/zkochan/src/test/issue394/node_module |
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
ERROR in /home/zkochan/.pnpm/.store/flat/[email protected]/_/lib/index.js | |
Module not found: Error: Cannot resolve module 'babel-loader' in /home/zkochan/.pnpm/.store/flat/[email protected]/_/lib | |
@ /home/zkochan/.pnpm/.store/flat/[email protected]/_/lib/index.js 3:0-23 | |
ERROR in /home/zkochan/.pnpm/.store/flat/[email protected]/_/lib/index.js | |
Module not found: Error: Cannot resolve module 'babel-loader' in /home/zkochan/.pnpm/.store/flat/[email protected]/_/lib | |
@ /home/zkochan/.pnpm/.store/flat/[email protected]/_/lib/index.js 7:0-35 | |
ERROR in /home/zkochan/.pnpm/.store/flat/[email protected]/_/lib/index.js | |
Module not found: Error: Cannot resolve module 'babel-loader' in /home/zkochan/.pnpm/.store/flat/[email protected]/_/lib |
- Use lebab to convert your modules to ES2015 modules.
lebab es5.js -o es6.js --transform commonjs
- Change the
.js
extensions to.ts
. - Install typescript as a devDependency to your package