This file contains hidden or 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
| import { createServer, staticFolders, routes, streamFile } from './server.js' | |
| /** | |
| * defaults | |
| */ | |
| // Set(2) { '', 'public' } | |
| // Map(2) { '/' => 'index.html', 'error' => 'error.html' } | |
| // add static folder | |
| staticFolders.add('assets') |
This file contains hidden or 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 const postCSSFunctions = { | |
| // get "i" cols excluding gutter | |
| cols: i => `calc(var(--col) * ${i} + var(--gutter) * ${i - 1})`, | |
| // get "i" cols including gutter | |
| push: i => `calc((var(--col) + var(--gutter)) * ${i})`, | |
| } |
This file contains hidden or 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
| /** | |
| * | |
| * @param {HTMLElement} [target=document.body] - Element to querySelect in | |
| * @param {boolean} [namespaced] - Only get children with data-ref-parent-ref | |
| * @param {string} [exclude] - Selector or element who's children wont be selected | |
| * @param {boolean | function} [watch] - Watches DOM and updates refs on mutation | |
| * @param {boolean} [asArray] - Saves all refs in arrays, also single elements | |
| * @returns {Object} { myRef: div, another: [button, span] } | |
| */ | |
| export default ({ |