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
import { h, Element } from "atomico"; | |
customElements.define( | |
"atom-hello", | |
class extends Element { | |
static get props() { | |
return ["text"]; | |
} | |
render() { | |
return <h1>hello {this.props.text}</h1>; | |
} |
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
0 info it worked if it ends with ok | |
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', | |
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', | |
1 verbose cli 'run', | |
1 verbose cli 'build:native' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 verbose run-script [ 'prebuild:native', 'build:native', 'postbuild:native' ] | |
5 info lifecycle [email protected]~prebuild:native: [email protected] | |
6 info lifecycle [email protected]~build:native: [email protected] |
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
WebComponent.props = { | |
fieldName: { | |
type: String, | |
value: "Default value" | |
} | |
}; |
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
function createEventEmmiter() { | |
let events = new Map(); | |
function addEventListener(type, callback) { | |
if (!events.has(type)) { | |
events.set(type, new Map()); | |
} | |
events.get(type).set(callback); | |
} |
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
export const Any = null; | |
export class BaseElement extends HTMLElement { | |
constructor() { | |
super(); | |
this.setup(); | |
} | |
async setup() { | |
this._attrs = {}; | |
this._props = {}; |
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
/** | |
* test peflink | |
* {@link https://perf.link/#eyJpZCI6IjYxcTQzOXdrd2J5IiwidGl0bGUiOiJGaW5kaW5nIG51bWJlcnMgaW4gYW4gYXJyYXkgb2YgMTAwMCIsImJlZm9yZSI6ImNvbnN0IGRhdGEgPSBbLi4uQXJyYXkoMTAwMCkua2V5cygpXS5tYXAoKHByb3ApID0%2BICh7XG4gIHByb3AsXG4gIHZhbHVlOiBNYXRoLnJhbmRvbSgpLFxufSkpOyIsInRlc3RzIjpbeyJuYW1lIjoiVHJhbnNmb3JtIGEgbWFwIG9mIHByb3BzIGFuZCB2YWx1ZXMgdG8gYW4gb2JqZWN0IHVzaW5nIHJlZHVjZSIsImNvZGUiOiJjb25zdCBuZXh0RGF0YSA9IGRhdGEucmVkdWNlKChuZXh0RGF0YSwgeyBwcm9wLCB2YWx1ZSB9KSA9PiB7XG4gIG5leHREYXRhW3Byb3BdID0gdmFsdWU7XG4gIHJldHVybiBuZXh0RGF0YTtcbn0sIHt9KTsiLCJydW5zIjpbNDgzMyw1NjY2LDU2NjYsODUwMCw1MTY2LDU1MDAsNjE2Niw1NjY2LDkzMzMsNjE2Niw1MDAwLDU2NjYsNjAwMCw1NjY2LDQ2NjYsNTgzMyw4NjY2LDYxNjYsNjMzMyw3MzMzLDU2NjYsNTY2NiwxMTUwMCw2MzMzLDcwMDAsNDY2Niw1NjY2LDExMDAwLDcwMDAsOTAwMCw1NTAwLDU2NjYsODE2Niw1NjY2LDY4MzMsNTY2Niw5MzMzLDQwMDAsNTY2Niw2NTAwLDc2NjYsNDgzMyw1MTY2LDExNTAwLDU4MzMsNTY2NiwxMDY2Niw3MzMzLDU2NjYsNTY2Niw1NjY2LDg4MzMsODgzMyw1NjY2LDY1MDAsNTAwMCw3MTY2LDk2NjYsNDE2Niw4MTY2LDU2NjYsNTY2Niw4MTY2LDQxNjYsNTY2Niw3MDAwLDU2NjYsOTUwMCw |
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
let task = []; | |
let inLoop; | |
let loopTask = () => { | |
let currentTask = task; | |
task = []; | |
let fn; | |
let start = performance.now(); | |
while ((fn = currentTask.pop())) { | |
let now = performance.now(); |
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
.body{color:tomato} | |
.button{color:black} |
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
const add = (list: string[]) => (rule: string) => list.push(rule) && ""; | |
function parse(css: string) { | |
const rules = []; | |
const atRules = []; | |
css | |
.replace(/\s+/g, " ") | |
.replace(/@([^{]+)\{(.*?}) *}/g, add(atRules)) | |
.replace(/([^}{;]*){([^}{]+)}/g, add(rules)); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer