<script type="text/javascript"> | |
// @ts-check | |
(function registerCreatiumSDK(libNamespace, libVersion) { | |
/** | |
* fire custom event, when the localsorage interractions. Src from: https://stackoverflow.com/a/69380917 | |
* @param {String} eventName - name of the event | |
*/ | |
function fireEventWhenLocalstorageChanged(eventName) { | |
Storage.prototype.setItem = new Proxy(Storage.prototype.setItem, { | |
apply(target, thisArg, [key, newValue]) { |
// my-custom-reporter.js | |
class MyCustomReporter { | |
constructor(globalConfig, options) { | |
this._globalConfig = globalConfig; | |
this._options = options; | |
} | |
onRunComplete(contexts, results) { | |
console.log('onRunComplete => Custom reporter output:'); | |
console.log('onRunComplete => GlobalConfig: ', this._globalConfig); |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
[{ | |
"type": "node", | |
"request": "launch", | |
"name": "bfe teamcity", | |
"runtimeExecutable": "grunt", | |
"cwd": "${workspaceFolder}/devTools/js", | |
"args": [ | |
"build-failer-eslint" | |
], | |
"env": { |
#!/bin/bash | |
for file in $(git diff --diff-filter=d --cached --name-only | grep -E '\.(js|jsx)$') | |
do | |
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes | |
if [ $? -ne 0 ]; then | |
echo "ESLint failed on staged file '$file'. Please check your code and try again." | |
exit 1 # exit with failure status | |
fi | |
done |
let stdout = ''; | |
beforeEach(() => { | |
stdout = ''; | |
process.stdout.write = (function (write) { | |
return function (string, encoding, fileDescriptor) { | |
stdout += `${string}\n`; | |
write.apply(process.stdout, arguments); | |
}; | |
})(process.stdout.write); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.ng-modal-overlay { | |
/* A dark translucent div that covers the whole screen */ | |
position:absolute; |
"use strict"; | |
var Checkbox = function(elementId,target,action){ | |
if(arguments.length < 2 && (elementId === undefined || target === undefined)){ | |
throw new Error(); | |
} | |
}; |
// # Mocha Guide to Testing | |
// Objective is to explain describe(), it(), and before()/etc hooks | |
// 1. `describe()` is merely for grouping, which you can nest as deep | |
// 2. `it()` is a test case | |
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run | |
// before/after first/each it() or describe(). | |
// | |
// Which means, `before()` is run before first it()/describe() |