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
{ | |
"Context_Typescript": { | |
"prefix": "ctxts", | |
"body": [ | |
"import React, { useReducer } from 'react';", | |
"", | |
"/* ***** */", | |
"/* Types */", | |
"/* ***** */", | |
"interface 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
Context-File Typescript: ctxts |
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 state = new Proxy(defaultState, { | |
set(target, value, reciver) { | |
switch (value) { | |
case "val": | |
document.getElementById( | |
"_6bb6g" | |
).textContent = `increment ${target.val} and ${target.val}`; | |
break; | |
case "val": |
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 function html(literals: { raw: any }, ...vars: any[]) { | |
let raw = literals.raw, | |
HTMLprecompiled = "", | |
i = 1, | |
len = arguments.length, | |
str, | |
variable; | |
while (i < len) { | |
str = raw[i - 1]; |
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 fs = require("fs"); | |
const path = require("path"); | |
const directory = path.join(__dirname, "public", "images"); | |
fs.readdir(directory, (error, files) => { | |
if (error) throw new Error("Could not read directory"); | |
files.forEach((file) => { | |
const file_path = path.join(directory, file); |