Skip to content

Instantly share code, notes, and snippets.

View dongsik-yoo's full-sized avatar

유동식 dongsik-yoo

  • Kakao Entertainment
  • Seoul
View GitHub Profile
@dongsik-yoo
dongsik-yoo / .gitignore
Last active October 2, 2023 14:20
javascript i18n automation with google spread sheet
# locale json files
/assets/locales/
@dongsik-yoo
dongsik-yoo / example.js
Created October 15, 2020 01:58
Intl.DateTimeFormat example
const date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
const options = {
timeZone: 'America/Los_Angeles',
timeStyle: 'long'
};
console.log(new Intl.DateTimeFormat('ko-KR', options).format(date));
// 오후 7시 0분 0초 GMT-8
output: {
library: ['tui', 'Calendar'], // Configuring the library namespace
libraryTarget: 'umd', // Configuring the library target
libraryExport: 'default', // Configuring the default export of the entry point to the namespace
...
}
{
"scripts": {
"doc": "tuidoc"
}
}
new (class extends v {
getComponent() {
return Object(o.h)("h2", null, "Week View");
}
})(document.getElementById("app1")).render();
import { Month, Week } from "esm-ui-library";
const week = new Week(document.getElementById("app1"));
week.render();
// const month = new Month(document.getElementById("app2"));
// month.render();
// document.getElementById("ssr").innerHTML = month.renderToString();
new (class extends v {
getComponent() {
return Object(o.h)("h2", null, "Week View");
}
})(document.getElementById("app1")).render();
const m = new (class extends v {
getComponent() {
return Object(o.h)("h2", null, "Month View");
}
})(document.getElementById("app2"));
import { Month, Week } from "esm-ui-library";
const week = new Week(document.getElementById("app1"));
week.render();
const month = new Month(document.getElementById("app2"));
month.render();
document.getElementById("ssr").innerHTML = month.renderToString();
import { h } from 'preact';
import Base from '@src/base';
export default class Week extends Base {
protected getComponent(): JSX.Element {
return <h2>Week View</h2>;
}
}
import { h } from 'preact';
import Base from '@src/base';
export default class Month extends Base {
protected getComponent(): JSX.Element {
return <h2>Month View</h2>;
}
}