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
<script> | |
let name = 'world'; | |
</script> | |
<h1>Hello {name}!</h1> |
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
<script> | |
import { createEventDispatcher } from 'svelte'; | |
import { getContext } from 'svelte'; | |
const dispatch = createEventDispatcher(); | |
export let a = 1; | |
export let b = 1; | |
export let title = 'xxx'; | |
$: product = a * b; |
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
<script> | |
import { createEventDispatcher } from 'svelte'; | |
import { getContext } from 'svelte'; | |
import { fade } from 'svelte/transition'; | |
const dispatch = createEventDispatcher(); | |
export let a = 1; | |
export let b = 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.0</real> |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
const PLUGIN_NAME = 'MY_WEBPACK_PLUGIN'; | |
class MyWebpackPlugin { | |
constructor() { | |
this.cssReady = false; | |
this.cssFiles = []; | |
} | |
apply(compiler) { | |
compiler.hooks.watchRun.tap(PLUGIN_NAME, () => { | |
this.cssReady = false; |
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
const { ConcatSource } = require('webpack-sources'); | |
const RuntimeGlobals = require('webpack/lib/RuntimeGlobals'); | |
const JavascriptModulesPlugin = require('webpack/lib/javascript/JavascriptModulesPlugin'); | |
/** @typedef {import("./Compiler")} Compiler */ | |
class SetModuleTemplatePlugin { | |
/** | |
* @param {string} moduleMethod the accessor where the library is exported | |
* @param {boolean} moduleName specify copying the exports |
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
const FILE_TYPES = { | |
JS: /\.js$/, | |
CSS: /\.css$/, | |
SCSS: /\.scss$/, | |
TS: /\.tsx?$/, | |
}; | |
const FOLDERS = { | |
APP: path.join(__dirname, './src'), | |
NODE_MODULES: path.join(__dirname, './node_modules'), | |
}; |
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
// setting a property in the `$scope` object triggers | |
// the framework to update the model and the DOM | |
$scope.name = 'Hello'; |
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
let _value; | |
Object.defineProperty(obj, 'awesome', { | |
get: () => { | |
try { | |
// intentionally throw an Error to get the call stack | |
throw new Error(); | |
} catch (error) { | |
// stack is the stack trace, | |
// containing error message and the stack | |
const stack = error.stack; |
NewerOlder