diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..8b13a80 --- /dev/null +++ b/deno.json @@ -0,0 +1,6 @@ +{ + "imports": { + "dom/": "https://stephen.band/dom/modules/", + "fn/": "https://stephen.band/fn/modules/" + } +} diff --git a/deno/compile.js b/deno/compile.js index ff3cdc2..e4a67b6 100644 --- a/deno/compile.js +++ b/deno/compile.js @@ -5,7 +5,7 @@ -import compileAsyncFn from '../../fn/modules/compile-async.js'; +import compileAsyncFn from 'fn/compile-async.js'; import { dimgreendim, dim, red, yellow } from './log.js'; diff --git a/deno/imports.js b/deno/imports.js index 0414b05..bed0e9a 100644 --- a/deno/imports.js +++ b/deno/imports.js @@ -1,7 +1,7 @@ import * as Path from "https://deno.land/std@0.110.0/path/mod.ts"; -import overload from '../../fn/modules/overload.js'; +import overload from 'fn/overload.js'; import getExtension from '../modules/get-extension.js'; import getAbsolute from './get-absolute.js'; import { red, yellow } from './log.js'; diff --git a/deno/include.js b/deno/include.js index 9116cfd..2bf0d48 100644 --- a/deno/include.js +++ b/deno/include.js @@ -1,8 +1,8 @@ -import id from '../../fn/modules/id.js'; -import noop from '../../fn/modules/noop.js'; -import overload from '../../fn/modules/overload.js'; -import toType from '../../fn/modules/to-type.js'; +import id from 'fn/id.js'; +import noop from 'fn/noop.js'; +import overload from 'fn/overload.js'; +import toType from 'fn/to-type.js'; import getExtension from '../modules/get-extension.js'; import getAbsolute from './get-absolute.js'; diff --git a/deno/parse-length.js b/deno/parse-length.js index 3f753b2..032ffbf 100644 --- a/deno/parse-length.js +++ b/deno/parse-length.js @@ -1,8 +1,8 @@ -import id from '../../fn/modules/id.js'; -import overload from '../../fn/modules/overload.js'; -import parseValue from '../../fn/modules/parse-value.js'; -import toType from '../../fn/modules/to-type.js'; +import id from 'fn/id.js'; +import overload from 'fn/overload.js'; +import parseValue from 'fn/parse-value.js'; +import toType from 'fn/to-type.js'; /** px(value) diff --git a/deno/read.js b/deno/read.js index 68c2fd0..3cc3d29 100644 --- a/deno/read.js +++ b/deno/read.js @@ -3,7 +3,7 @@ read(pathname) **/ -import cache from '../../fn/modules/cache.js'; +import cache from 'fn/cache.js'; import { dimbluedim } from './log.js'; // TextDecoder decodes the Uint8Array to unicode text diff --git a/deno/scope.js b/deno/scope.js index 7c58d1c..814a468 100644 --- a/deno/scope.js +++ b/deno/scope.js @@ -4,12 +4,12 @@ import * as path from "https://deno.land/std@0.110.0/path/mod.ts"; // Absolute path to module const moduleAbs = path.dirname(path.fromFileUrl(import.meta.url)); -import { addDate } from '../../fn/modules/date.js'; -import { addTime } from '../../fn/modules/time.js'; -import exec from '../../fn/modules/exec.js'; -import get from '../../fn/modules/get.js'; -import overload from '../../fn/modules/overload.js'; -import toType from '../../fn/modules/to-type.js'; +import { addDate } from 'fn/date.js'; +import { addTime } from 'fn/time.js'; +import exec from 'fn/exec.js'; +import get from 'fn/get.js'; +import overload from 'fn/overload.js'; +import toType from 'fn/to-type.js'; import read from './read.js'; import { rewriteURL, rewriteURLs } from './url.js'; diff --git a/documentation/classes/nav.js b/documentation/classes/nav.js index 6ea70ca..9ee9318 100644 --- a/documentation/classes/nav.js +++ b/documentation/classes/nav.js @@ -1,6 +1,6 @@ -import { clamp } from '../../../fn/modules/clamp.js'; -import events from '../../../dom/modules/events.js'; +import { clamp } from 'fn/clamp.js'; +import events from 'dom/events.js'; events({ type: 'scroll', capture: true }, window) diff --git a/documentation/module.js b/documentation/module.js index 31c4893..2d91537 100644 --- a/documentation/module.js +++ b/documentation/module.js @@ -6,7 +6,7 @@ import '../../bolt/classes/device.js'; import DetailsToggle from '../../details-toggle/module.js'; // Events -import navigate from '../../dom/modules/navigate.js'; +import navigate from 'dom/navigate.js'; // Components import './classes/nav.js'; diff --git a/element/element.js b/element/element.js index d86d395..b82c989 100644 --- a/element/element.js +++ b/element/element.js @@ -1,9 +1,9 @@ -import cache from '../../fn/modules/cache.js'; -import Data from '../../fn/modules/data.js'; -import create from '../../dom/modules/create.js'; -import element, { getInternals } from '../../dom/modules/element.js'; -import toPrefetchPromise from '../../dom/modules/element/to-prefetch-promise.js'; +import cache from 'fn/cache.js'; +import Data from 'fn/data.js'; +import create from 'dom/create.js'; +import element, { getInternals } from 'dom/element.js'; +import toPrefetchPromise from 'dom/element/to-prefetch-promise.js'; import getById from '../modules/dom/get-by-id.js'; import assignDataset from '../modules/dom/assign-dataset.js'; import Literal from '../modules/template.js'; diff --git a/element/property.js b/element/property.js index 4518bd7..c2c1099 100644 --- a/element/property.js +++ b/element/property.js @@ -1,12 +1,12 @@ -import Signal from '../../fn/modules/signal.js'; -import arg from '../../fn/modules/arg.js'; -import nothing from '../../fn/modules/nothing.js'; -import overload from '../../fn/modules/overload.js'; -import toCamelCase from '../../fn/modules/to-camel-case.js'; -import TokenList from '../../dom/modules/element/token-list.js'; -import updateTokenList from '../../dom/modules/element/update-token-list.js'; -import { getInternals } from '../../dom/modules/element.js'; +import Signal from 'fn/signal.js'; +import arg from 'fn/arg.js'; +import nothing from 'fn/nothing.js'; +import overload from 'fn/overload.js'; +import toCamelCase from 'fn/to-camel-case.js'; +import TokenList from 'dom/element/token-list.js'; +import updateTokenList from 'dom/element/update-token-list.js'; +import { getInternals } from 'dom/element.js'; import requestData from '../modules/request-data.js'; const define = Object.defineProperty; diff --git a/element/test.html b/element/test.html index a828aaf..251d3c9 100644 --- a/element/test.html +++ b/element/test.html @@ -10,6 +10,19 @@ window.DEBUG = true; + + + diff --git a/literal-element/module.js b/literal-element/module.js index 378a01b..a871601 100644 --- a/literal-element/module.js +++ b/literal-element/module.js @@ -44,7 +44,7 @@ That may now be authored:

Current time:

**/ -import element from '../../dom/modules/element.js'; +import element from 'dom/element.js'; import lifecycle from './modules/lifecycle.js'; import properties from './modules/properties.js'; diff --git a/literal-element/modules/lifecycle.js b/literal-element/modules/lifecycle.js index 6b71dfa..1d17db0 100644 --- a/literal-element/modules/lifecycle.js +++ b/literal-element/modules/lifecycle.js @@ -1,8 +1,8 @@ // Lifecycle for