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
/** | |
* svelte2Angularjs | |
* | |
* Render templates or DOM elements inside a Svelte component with AngularJS | |
* | |
* Usage: | |
* svelte2Angularjs({ el: ngDom }); | |
* svelte2Angularjs({ | |
* el: ngDom2, | |
* template: `<span> {{mode === 'recent' ? 'Recent Activity' : 'Feed'}}</span>`, |
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
import type { SvelteComponent } from "svelte"; | |
import type { IControllerConstructor, IOnChangesObject } from "angular"; | |
/** | |
* Turn a Svelte component into an AngularJS component | |
* | |
* ## Usage | |
* | |
* Create the component boilerplate for use inside AngularJS code: | |
// app.header.component.ts | |
import type { IComponentOptions } from 'angular'; |
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
/** | |
* Useage: | |
* <svelte component="MySvelteComponent" all-props="allPropsFromAngularJS"></svelte> | |
* | |
*/ | |
(function() { | |
'use strict'; | |
angular | |
.module('myapp') |
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
#!/bin/bash | |
# @link https://gist.github.com/rcline/e010918635d8359a2c1aa83135087797 | |
# | |
# A hook script to verify what is about to be pushed. Called by "git | |
# push" after it has checked the remote status, but before anything has been | |
# pushed. If this script exits with a non-zero status nothing will be pushed. | |
# | |
# This hook is called with the following parameters: | |
# |
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
((doc, log) => { | |
el = doc.getElementsByClassName("link-gray-dark"); | |
pkgs = []; | |
Object.keys(el).map((c) => { | |
const split = el[c].innerText.split('/'); | |
if (split[0] == 'packages') { | |
pkgs.push( | |
`@sstk/${split[1]}` | |
) |
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
/** | |
* You must keep the sidebar open while it is turning off the bundles | |
* (Window doesn't have to be active but if you mouse hovers over the webpack stats graph it will break.) | |
*/ | |
// Manually open the sidebar | |
((win) => { | |
sideBar = document.querySelectorAll('#app > div > div.Sidebar__container.Sidebar__left > button.Sidebar__toggleButton.Button__button')[0]; | |
sideBar.click(); | |
// Wait for side bar navigation to finish |