Skip to content

Commit

Permalink
simpler ts setup
Browse files Browse the repository at this point in the history
  • Loading branch information
escoand committed Jan 30, 2023
1 parent 368939e commit 5135b5f
Show file tree
Hide file tree
Showing 11 changed files with 337 additions and 492 deletions.
2 changes: 1 addition & 1 deletion dist/caldav.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/caldav.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/multicol.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/multicol.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/yearview.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/yearview.js.map

Large diffs are not rendered by default.

772 changes: 304 additions & 468 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"@fullcalendar/core": "^6.0.3",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.0.6",
"@rollup/plugin-typescript": "^11.0.0",
"core-js": "^3.19",
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@fullcalendar/core": "^6.1.0",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.0",
"core-js": "^3.27.2",
"ical.js": "^1.5.0",
"rollup": "^2.60.1",
"rollup": "^3.12.0",
"rollup-plugin-import-css": "^3.1.0",
"rollup-plugin-serve": "^1.1.0",
"rollup-plugin-terser": "^7.0.2",
"tslib": "^2.4.1",
"rollup-plugin-serve": "^2.0.2",
"tslib": "^2.5.0",
"typescript": "^4.9.4"
},
"scripts": {
Expand Down
13 changes: 7 additions & 6 deletions rollup.config.js → rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import { babel } from "@rollup/plugin-babel";
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
import terser from "@rollup/plugin-terser";
import css from "rollup-plugin-import-css";
import serve from "rollup-plugin-serve";
import { terser } from "rollup-plugin-terser";

const extensions = [".js", ".jsx", ".ts", ".tsx"];

const plugins = [
resolve(),
resolve({ extensions }),
commonjs(),
typescript(),
babel({
babelHelpers: "bundled",
exclude: [/\/core-js\//],
extensions,
presets: [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
corejs: "3.19",
modules: false,
corejs: "3.27",
useBuiltIns: "usage",
},
],
Expand Down
3 changes: 3 additions & 0 deletions src/multicol.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.fc-multicol {
border-collapse: collapse !important;
}
.fc-multicol .fc-day-col {
width: 75px;
}
.fc-multicol .fc-day-today {
background-color: var(--fc-today-bg-color);
}
Expand Down
5 changes: 5 additions & 0 deletions src/multicol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ class MultiColumnComponent extends BaseComponent {
context.calendarApi.getCurrentData().eventSources
).filter((source) => source?.ui.display != "background");

// cols
const cols = showDayHeaders ? [h("col", { class: "fc-day-col" })] : [];
fgSources.forEach(() => cols.push(h("col", {})));

// headers
const headers = (showDayHeaders ? [null] : [])
.concat(fgSources)
Expand Down Expand Up @@ -95,6 +99,7 @@ class MultiColumnComponent extends BaseComponent {
h(
"table",
{ class: "fc-scrollgrid fc-multicol" },
h("colgroup", {}, cols),
h("thead", {}, h("tr", {}, headers)),
h("tbody", {}, rows)
),
Expand Down

0 comments on commit 5135b5f

Please sign in to comment.