kempo 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Component.js +1 -1
- package/docs/kempo/components/Component.js +1 -1
- package/docs/src/icons/arrow-down-double.svg +1 -0
- package/docs/src/icons/arrow-up-double.svg +1 -0
- package/docs/src/icons/close.svg +2 -0
- package/docs/src/icons/compare.svg +1 -0
- package/docs/src/icons/dark-mode.svg +1 -0
- package/docs/src/icons/delete.svg +1 -0
- package/docs/src/icons/filter-off.svg +1 -0
- package/docs/src/icons/filter.svg +1 -0
- package/docs/src/icons/light-mode.svg +1 -0
- package/docs/src/icons/menu.svg +1 -0
- package/docs/src/icons/pause.svg +1 -0
- package/docs/src/icons/play.svg +1 -0
- package/docs/src/icons/search.svg +1 -0
- package/docs/src/icons/settings.svg +1 -0
- package/docs/src/icons/storage.svg +1 -0
- package/docs/src/icons/trash-x.svg +1 -0
- package/package.json +3 -4
- package/scripts/build.js +12 -12
- package/{kempo → src}/components/Component.js +1 -1
- /package/{kempo → src}/components/Card.js +0 -0
- /package/{kempo → src}/components/CodeEditor.js +0 -0
- /package/{kempo → src}/components/Dialog.js +0 -0
- /package/{kempo → src}/components/FocusCapture.js +0 -0
- /package/{kempo → src}/components/Icon.js +0 -0
- /package/{kempo → src}/components/Import.js +0 -0
- /package/{kempo → src}/components/LazyComponent.js +0 -0
- /package/{kempo → src}/components/ReactiveComponent.js +0 -0
- /package/{kempo → src}/components/ReactiveLazyComponent.js +0 -0
- /package/{kempo → src}/components/Resize.js +0 -0
- /package/{kempo → src}/components/Search.js +0 -0
- /package/{kempo → src}/components/ShowMore.js +0 -0
- /package/{kempo → src}/components/SideMenu.js +0 -0
- /package/{kempo → src}/components/Split.js +0 -0
- /package/{kempo → src}/components/Tabs.js +0 -0
- /package/{kempo → src}/components/ThemeSwitcher.js +0 -0
- /package/{kempo → src}/components/Timestamp.js +0 -0
- /package/{kempo → src}/components/WebSnippetEditor.js +0 -0
- /package/{kempo → src}/kempo-hljs.css +0 -0
- /package/{kempo → src}/kempo-styles.css +0 -0
- /package/{kempo → src}/kempo-vars.css +0 -0
- /package/{kempo → src}/kempo.js +0 -0
- /package/{kempo → src}/utils/cli.js +0 -0
- /package/{kempo → src}/utils/cookie.js +0 -0
- /package/{kempo → src}/utils/debounce.js +0 -0
- /package/{kempo → src}/utils/drag.js +0 -0
- /package/{kempo → src}/utils/element.js +0 -0
- /package/{kempo → src}/utils/formatTimestamp.js +0 -0
- /package/{kempo → src}/utils/fuzzyMatch.js +0 -0
- /package/{kempo → src}/utils/getPreferredTheme.js +0 -0
- /package/{kempo → src}/utils/loadCss.js +0 -0
- /package/{kempo → src}/utils/loadScript.js +0 -0
- /package/{kempo → src}/utils/object.js +0 -0
- /package/{kempo → src}/utils/string.js +0 -0
- /package/{kempo → src}/utils/toFunction.js +0 -0
- /package/{kempo → src}/utils/type.js +0 -0
- /package/{kempo → src}/utils/waitFrames.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCase}from"../utils/string.js";export default class Component extends HTMLElement{constructor(t={}){super(),this.attachShadow({mode:"open",...t}),this.registerAttribute("rendered",!1)}async connectedCallback(){this.render()}async disconnectedCallback(){}async attributeChangedCallback(){}async propChangedCallback(){}async render(t=!1){if(t||!this.rendered)return this.shadowRoot.innerHTML=`<link rel="stylesheet" href="${Component.pathToKempo}/kempo-styles.css" />${this.shadowTemplate}<style>${this.shadowStyles}</style>`,this.rendered=!0,!0}registerAttribute(t,e=""){const{camel:s,dash:r}=getCase(t),i=typeof e;Object.defineProperty(this,s,{get:()=>{const t=this.getAttribute(r);return"number"==i?parseFloat(t):"object"===i?"string"==typeof t?JSON.parse(t):t:"boolean"===i?"string"==typeof t?"true"===t.toLowerCase().trim():!!t:"string"===i?t||"":t},set:t=>{this[r]!==t&&("boolean"===i?t?this.setAttribute(r,"true"):this.removeAttribute(r):"object"===i?this.setAttribute(r,JSON.stringify(t||{})):"number"===i?t||0===t?this.setAttribute(r,t):this.removeAttribute(r):this.setAttribute(r,t))}}),null===this.getAttribute(r)&&(this[s]=e)}registerAttributes(t){for(const e in t)this.registerAttribute(e,t[e])}registerProp(t,e){const s=Symbol(t);this[s]=e,Object.defineProperty(this,t,{get:()=>this[s],set:e=>{if(this[s]!==e){const r=this[s];this[s]=e,this.propChangedCallback(t,r,e)}}})}registerProps(t){for(const e in t)this.registerProp(e,t[e])}renderIf(t,e){return t?e:""}get shadowTemplate(){return"\n <slot></slot>\n "}get shadowStyles(){return""}static observedAttributes=["rendered"];static pathToKempo=import.meta.url.substring(0,import.meta.url.indexOf("/components/Component.js"))}
|
|
1
|
+
import{getCase}from"../utils/string.js";export default class Component extends HTMLElement{constructor(t={}){super(),this.attachShadow({mode:"open",...t}),this.registerAttribute("rendered",!1)}async connectedCallback(){this.render(!0)}async disconnectedCallback(){}async attributeChangedCallback(){}async propChangedCallback(){}async render(t=!1){if(t||!this.rendered)return this.shadowRoot.innerHTML=`<link rel="stylesheet" href="${Component.pathToKempo}/kempo-styles.css" />${this.shadowTemplate}<style>${this.shadowStyles}</style>`,this.rendered=!0,!0}registerAttribute(t,e=""){const{camel:s,dash:r}=getCase(t),i=typeof e;Object.defineProperty(this,s,{get:()=>{const t=this.getAttribute(r);return"number"==i?parseFloat(t):"object"===i?"string"==typeof t?JSON.parse(t):t:"boolean"===i?"string"==typeof t?"true"===t.toLowerCase().trim():!!t:"string"===i?t||"":t},set:t=>{this[r]!==t&&("boolean"===i?t?this.setAttribute(r,"true"):this.removeAttribute(r):"object"===i?this.setAttribute(r,JSON.stringify(t||{})):"number"===i?t||0===t?this.setAttribute(r,t):this.removeAttribute(r):this.setAttribute(r,t))}}),null===this.getAttribute(r)&&(this[s]=e)}registerAttributes(t){for(const e in t)this.registerAttribute(e,t[e])}registerProp(t,e){const s=Symbol(t);this[s]=e,Object.defineProperty(this,t,{get:()=>this[s],set:e=>{if(this[s]!==e){const r=this[s];this[s]=e,this.propChangedCallback(t,r,e)}}})}registerProps(t){for(const e in t)this.registerProp(e,t[e])}renderIf(t,e){return t?e:""}get shadowTemplate(){return"\n <slot></slot>\n "}get shadowStyles(){return""}static observedAttributes=["rendered"];static pathToKempo=import.meta.url.substring(0,import.meta.url.indexOf("/components/Component.js"))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCase}from"../utils/string.js";export default class Component extends HTMLElement{constructor(t={}){super(),this.attachShadow({mode:"open",...t}),this.registerAttribute("rendered",!1)}async connectedCallback(){this.render()}async disconnectedCallback(){}async attributeChangedCallback(){}async propChangedCallback(){}async render(t=!1){if(t||!this.rendered)return this.shadowRoot.innerHTML=`<link rel="stylesheet" href="${Component.pathToKempo}/kempo-styles.css" />${this.shadowTemplate}<style>${this.shadowStyles}</style>`,this.rendered=!0,!0}registerAttribute(t,e=""){const{camel:s,dash:r}=getCase(t),i=typeof e;Object.defineProperty(this,s,{get:()=>{const t=this.getAttribute(r);return"number"==i?parseFloat(t):"object"===i?"string"==typeof t?JSON.parse(t):t:"boolean"===i?"string"==typeof t?"true"===t.toLowerCase().trim():!!t:"string"===i?t||"":t},set:t=>{this[r]!==t&&("boolean"===i?t?this.setAttribute(r,"true"):this.removeAttribute(r):"object"===i?this.setAttribute(r,JSON.stringify(t||{})):"number"===i?t||0===t?this.setAttribute(r,t):this.removeAttribute(r):this.setAttribute(r,t))}}),null===this.getAttribute(r)&&(this[s]=e)}registerAttributes(t){for(const e in t)this.registerAttribute(e,t[e])}registerProp(t,e){const s=Symbol(t);this[s]=e,Object.defineProperty(this,t,{get:()=>this[s],set:e=>{if(this[s]!==e){const r=this[s];this[s]=e,this.propChangedCallback(t,r,e)}}})}registerProps(t){for(const e in t)this.registerProp(e,t[e])}renderIf(t,e){return t?e:""}get shadowTemplate(){return"\n <slot></slot>\n "}get shadowStyles(){return""}static observedAttributes=["rendered"];static pathToKempo=import.meta.url.substring(0,import.meta.url.indexOf("/components/Component.js"))}
|
|
1
|
+
import{getCase}from"../utils/string.js";export default class Component extends HTMLElement{constructor(t={}){super(),this.attachShadow({mode:"open",...t}),this.registerAttribute("rendered",!1)}async connectedCallback(){this.render(!0)}async disconnectedCallback(){}async attributeChangedCallback(){}async propChangedCallback(){}async render(t=!1){if(t||!this.rendered)return this.shadowRoot.innerHTML=`<link rel="stylesheet" href="${Component.pathToKempo}/kempo-styles.css" />${this.shadowTemplate}<style>${this.shadowStyles}</style>`,this.rendered=!0,!0}registerAttribute(t,e=""){const{camel:s,dash:r}=getCase(t),i=typeof e;Object.defineProperty(this,s,{get:()=>{const t=this.getAttribute(r);return"number"==i?parseFloat(t):"object"===i?"string"==typeof t?JSON.parse(t):t:"boolean"===i?"string"==typeof t?"true"===t.toLowerCase().trim():!!t:"string"===i?t||"":t},set:t=>{this[r]!==t&&("boolean"===i?t?this.setAttribute(r,"true"):this.removeAttribute(r):"object"===i?this.setAttribute(r,JSON.stringify(t||{})):"number"===i?t||0===t?this.setAttribute(r,t):this.removeAttribute(r):this.setAttribute(r,t))}}),null===this.getAttribute(r)&&(this[s]=e)}registerAttributes(t){for(const e in t)this.registerAttribute(e,t[e])}registerProp(t,e){const s=Symbol(t);this[s]=e,Object.defineProperty(this,t,{get:()=>this[s],set:e=>{if(this[s]!==e){const r=this[s];this[s]=e,this.propChangedCallback(t,r,e)}}})}registerProps(t){for(const e in t)this.registerProp(e,t[e])}renderIf(t,e){return t?e:""}get shadowTemplate(){return"\n <slot></slot>\n "}get shadowStyles(){return""}static observedAttributes=["rendered"];static pathToKempo=import.meta.url.substring(0,import.meta.url.indexOf("/components/Component.js"))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M480-200 240-440l56-56 184 183 184-183 56 56-240 240Zm0-240L240-680l56-56 184 183 184-183 56 56-240 240Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="m296-224-56-56 240-240 240 240-56 56-184-183-184 183Zm0-240-56-56 240-240 240 240-56 56-184-183-184 183Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M400-40v-80H200q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h200v-80h80v880h-80ZM200-240h200v-240L200-240Zm360 120v-360l200 240v-520H560v-80h200q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H560Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M480-120q-150 0-255-105T120-480q0-150 105-255t255-105q14 0 27.5 1t26.5 3q-41 29-65.5 75.5T444-660q0 90 63 153t153 63q55 0 101-24.5t75-65.5q2 13 3 26.5t1 27.5q0 150-105 255T480-120Zm0-80q88 0 158-48.5T740-375q-20 5-40 8t-40 3q-123 0-209.5-86.5T364-660q0-20 3-40t8-40q-78 32-126.5 102T200-480q0 116 82 198t198 82Zm-10-270Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="m592-481-57-57 143-182H353l-80-80h487q25 0 36 22t-4 42L592-481ZM791-56 560-287v87q0 17-11.5 28.5T520-160h-80q-17 0-28.5-11.5T400-200v-247L56-791l56-57 736 736-57 56ZM535-538Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M440-160q-17 0-28.5-11.5T400-200v-240L168-736q-15-20-4.5-42t36.5-22h560q26 0 36.5 22t-4.5 42L560-440v240q0 17-11.5 28.5T520-160h-80Zm40-308 198-252H282l198 252Zm0 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M480-360q50 0 85-35t35-85q0-50-35-85t-85-35q-50 0-85 35t-35 85q0 50 35 85t85 35Zm0 80q-83 0-141.5-58.5T280-480q0-83 58.5-141.5T480-680q83 0 141.5 58.5T680-480q0 83-58.5 141.5T480-280ZM200-440H40v-80h160v80Zm720 0H760v-80h160v80ZM440-760v-160h80v160h-80Zm0 720v-160h80v160h-80ZM256-650l-101-97 57-59 96 100-52 56Zm492 496-97-101 53-55 101 97-57 59Zm-98-550 97-101 59 57-100 96-56-52ZM154-212l101-97 55 53-97 101-59-57Zm326-268Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="currentColor" d="M28.25 38V10H36v28ZM12 38V10h7.75v28Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="currentColor" d="M16 37.85v-28l22 14Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" ><path fill="currentColor" d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M120-160v-160h720v160H120Zm80-40h80v-80h-80v80Zm-80-440v-160h720v160H120Zm80-40h80v-80h-80v80Zm-80 280v-160h720v160H120Zm80-40h80v-80h-80v80Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="m376-300 104-104 104 104 56-56-104-104 104-104-56-56-104 104-104-104-56 56 104 104-104 104 56 56Zm-96 180q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520Zm-400 0v520-520Z"/></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kempo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A web component library",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,10 +11,9 @@
|
|
|
11
11
|
},
|
|
12
12
|
"author": "Dustin Poissant",
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"express": "^4.18.3"
|
|
16
|
-
},
|
|
14
|
+
"dependencies": {},
|
|
17
15
|
"devDependencies": {
|
|
16
|
+
"express": "^4.18.3",
|
|
18
17
|
"fs-extra": "^11.2.0",
|
|
19
18
|
"terser": "^5.29.2"
|
|
20
19
|
},
|
package/scripts/build.js
CHANGED
|
@@ -3,14 +3,14 @@ import fse from 'fs-extra';
|
|
|
3
3
|
import { minify } from 'terser';
|
|
4
4
|
|
|
5
5
|
console.log('Loading utils');
|
|
6
|
-
const components = (await fs.readdir('./
|
|
6
|
+
const components = (await fs.readdir('./src/components/')).map(f=>f.substring(0,f.length-3));
|
|
7
7
|
let complete = 0;
|
|
8
8
|
|
|
9
9
|
console.log('Loading Component Source Code');
|
|
10
10
|
process.stdout.write(`0/${components.length} = 0%`);
|
|
11
11
|
const componentCode = {};
|
|
12
12
|
await Promise.all(components.map( async component => {
|
|
13
|
-
componentCode[component] = await fs.readFile(`./
|
|
13
|
+
componentCode[component] = await fs.readFile(`./src/components/${component}.js`, 'utf-8');
|
|
14
14
|
process.stdout.write("\r");
|
|
15
15
|
complete++;
|
|
16
16
|
process.stdout.write(`${complete}/${components.length} = ${Math.round((complete/components.length)*100)}%`);
|
|
@@ -42,14 +42,14 @@ await Promise.all(components.map( async component => {
|
|
|
42
42
|
process.stdout.write("\n");
|
|
43
43
|
|
|
44
44
|
console.log('Loading Utils');
|
|
45
|
-
const utils = (await fs.readdir('./
|
|
45
|
+
const utils = (await fs.readdir('./src/utils/')).map(f=>f.substring(0,f.length-3));
|
|
46
46
|
complete = 0;
|
|
47
47
|
|
|
48
48
|
console.log('Loading Utils Source Code');
|
|
49
49
|
process.stdout.write(`0/${utils.length} = 0%`);
|
|
50
50
|
const utilCode = {};
|
|
51
51
|
await Promise.all(utils.map( async util => {
|
|
52
|
-
utilCode[util] = await fs.readFile(`./
|
|
52
|
+
utilCode[util] = await fs.readFile(`./src/utils/${util}.js`, 'utf-8');
|
|
53
53
|
process.stdout.write("\r");
|
|
54
54
|
complete++;
|
|
55
55
|
process.stdout.write(`${complete}/${utils.length} = ${Math.round((complete/utils.length)*100)}%`);
|
|
@@ -94,38 +94,38 @@ console.log('Saving minified main entry file');
|
|
|
94
94
|
await fs.writeFile('./dist/index.js', minifiedMain, 'utf-8');
|
|
95
95
|
|
|
96
96
|
console.log('Loading kempo.js');
|
|
97
|
-
const kempoJS = await fs.readFile('./
|
|
97
|
+
const kempoJS = await fs.readFile('./src/kempo.js', 'utf-8');
|
|
98
98
|
console.log('Minifying kempo.js');
|
|
99
99
|
const minifiedKempoJs = (await minify(kempoJS)).code;
|
|
100
100
|
console.log('Saving minfiied kempo.js');
|
|
101
101
|
await fs.writeFile('./dist/kempo.js', minifiedKempoJs, 'utf-8');
|
|
102
102
|
|
|
103
103
|
console.log('Loading kempo-vars.css');
|
|
104
|
-
const kempoVarsCSS = await fs.readFile('./
|
|
104
|
+
const kempoVarsCSS = await fs.readFile('./src/kempo-vars.css', 'utf-8');
|
|
105
105
|
console.log('Minifying kempo-vars.css');
|
|
106
106
|
const minifiedKempoVarsCSS = kempoVarsCSS.replace(/\s*\{\s*/g, '{').replace(/\s*\}\s*/g, '}').replace(/\n/g, '').replace(/\r/g, '').replace(/\s+/g, ' ').replace(/\s*\:\s*/g, ':').replace(/\s*\;\s*/g, ';').replace(/;\}/g, '}');
|
|
107
107
|
console.log('Saving kempo-vars.css');
|
|
108
108
|
await fs.writeFile('./dist/kempo-vars.css', minifiedKempoVarsCSS, 'utf-8');
|
|
109
109
|
|
|
110
110
|
console.log('Loading kempo-styles.css');
|
|
111
|
-
const kempoStylesCSS = await fs.readFile('./
|
|
111
|
+
const kempoStylesCSS = await fs.readFile('./src/kempo-styles.css', 'utf-8');
|
|
112
112
|
console.log('Minifying kempo-styles.css');
|
|
113
113
|
const miniefiedKempoStylesCSS = kempoStylesCSS.replace(/\s*\{\s*/g, '{').replace(/\s*\}\s*/g, '}').replace(/\n/g, '').replace(/\r/g, '').replace(/\s+/g, ' ').replace(/\s*\:\s*/g, ':').replace(/\s*\;\s*/g, ';').replace(/;\}/g, '}');
|
|
114
114
|
console.log('Saving kempo-styles.css');
|
|
115
115
|
await fs.writeFile('./dist/kempo-styles.css', miniefiedKempoStylesCSS, 'utf-8');
|
|
116
116
|
|
|
117
117
|
console.log('Loading kempo-hljs.css');
|
|
118
|
-
const kempoHljsCSS = await fs.readFile('./
|
|
118
|
+
const kempoHljsCSS = await fs.readFile('./src/kempo-hljs.css', 'utf-8');
|
|
119
119
|
console.log('Minifying kempo-hljs.css');
|
|
120
120
|
const minifiedKempoHljsCSS = kempoHljsCSS.replace(/\s*\{\s*/g, '{').replace(/\s*\}\s*/g, '}').replace(/\n/g, '').replace(/\r/g, '').replace(/\s+/g, ' ').replace(/\s*\:\s*/g, ':').replace(/\s*\;\s*/g, ';').replace(/;\}/g, '}');
|
|
121
121
|
console.log('Saving kempo-hljs.css');
|
|
122
122
|
await fs.writeFile('./dist/kempo-hljs.css', minifiedKempoHljsCSS, 'utf-8');
|
|
123
123
|
|
|
124
|
-
console.log('Copying dist/ to docs/
|
|
125
|
-
await fse.ensureDir('./docs/
|
|
124
|
+
console.log('Copying dist/ to docs/src/');
|
|
125
|
+
await fse.ensureDir('./docs/src/icons'); // will also ensure docs/kempo
|
|
126
126
|
await fse.copy('./dist', './docs/kempo')
|
|
127
127
|
|
|
128
|
-
console.log('Copying icons/ to docs/
|
|
129
|
-
await fse.copy('./icons', './docs/
|
|
128
|
+
console.log('Copying icons/ to docs/src/icons/');
|
|
129
|
+
await fse.copy('./icons', './docs/src/icons')
|
|
130
130
|
|
|
131
131
|
console.log('Build Complete');
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{kempo → src}/kempo.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|