0.1.0 • Published 12 months ago

@importable/document v0.1.0

Weekly downloads
-
License
CC0-1.0
Repository
github
Last release
12 months ago

@importable/document

Importable Document allows you to import documents with strong typing based on import attributes (presently import assertions).

import document from './document.kdl' assert { type: 'document', from: 'kdl' }

console.assert(doc.name === 'html')
console.assert(doc.children[1].name === 'body')

Installation

npm install importable @importable/document
{
  "compilerOptions": {
    "plugins": [
      {
        "name": "importable",
        "plugins": [
          "@importable/document"
        ]
      }
    ]
  }
}

License

Code original to this project is licensed under the CC0-1.0 License.