Skip to content

Commit

Permalink
Merge pull request #4 from klovaaxel/refactor
Browse files Browse the repository at this point in the history
Minor fixes and refactors
  • Loading branch information
klovaaxel authored Nov 18, 2024
2 parents cd6ba46 + 732d0ad commit d7f4055
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 909 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion demo/assets/index-8m_zFTSv.css

This file was deleted.

4 changes: 0 additions & 4 deletions demo/assets/index-IGd_RBah.js

This file was deleted.

33 changes: 0 additions & 33 deletions demo/index.html

This file was deleted.

30 changes: 30 additions & 0 deletions dev-tools/filesize.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const fs = require("fs");
const path = require("path");

const getAllFiles = (dirPath, arrayOfFiles: string[] = []) => {
const files = fs.readdirSync(dirPath);

let filesArray = arrayOfFiles;

for (const file of files)
if (fs.statSync(`${dirPath}/${file}`).isDirectory())
filesArray = getAllFiles(`${dirPath}/${file}`, filesArray);
else filesArray.push(path.join(path.resolve(__dirname, ".."), dirPath, file));

return filesArray;
};

const getSizeOfFiles = (files) => {
let size = 0;
for (const file of files) size += fs.statSync(file).size;

return size;
};

const srcFiles = getAllFiles("src");
const srcSize = getSizeOfFiles(srcFiles);
console.log(`The size of all files in the SRC directory is ${srcSize} bytes.`);

const distFiles = getAllFiles("dist");
const distSize = getSizeOfFiles(distFiles);
console.log(`The size of all files in the DIST directory is ${distSize} bytes.`);
5 changes: 0 additions & 5 deletions docs/assets/index-Bq3_fauC.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/assets/index-Dw9mXXwR.css

This file was deleted.

11 changes: 6 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="An adaptable framework for building accessible comboboxes. Built as a web component">

<title>Combobox Framework</title>

<link rel="stylesheet" href="/docs/styles/style.css" />

<!-- fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<!-- end -->

<title>Combobox Framework</title>

<!-- highlightjs -->
<link rel="preconnect" href="https://cdnjs.cloudflare.com">
Expand All @@ -20,11 +22,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/xml.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/css.min.js"></script>
<!-- end -->
<script type="module" crossorigin src="./assets/index-Bq3_fauC.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-Dw9mXXwR.css">
</head>
<body>

<article>
<header>
<h1>Combobox framework documentation</h1>
Expand Down Expand Up @@ -800,6 +799,8 @@ <h2 id="styling">Styling</h2>
</section>
</article>

<script type="module" src="https://unpkg.com/combobox-framework"></script>

<script>
const examples = document.querySelectorAll("[data-example]");
for (const example of examples) {
Expand Down
File renamed without changes.
Loading

0 comments on commit d7f4055

Please sign in to comment.