UNPKG

create-modulo

Version:

Starter projects for Modulo.html - Ready for all uses - Markdown-SSG / SSR / API-backed SPA

54 lines (38 loc) 2.25 kB
<!DOCTYPE html><script src=../static/Modulo.html></script><script type=md>--- title: Core Definitions --- # Core Definitions Core definitions can be placed at the top level of Modulo code. That is to say, the definitions listed here (Artifact, Component, Configuration, and Library) can all be defined at the top level of file loaded by *Modulo* or Library, or embedded directly within a Modulo tag in the `<head>` of the document. Typically, documentation on this page is most useful when you want to dig into configuring Modulo to behave a certain way across multiple pages, or interacting with other frameworks and versions. > **Which ones to use?** Most users of Modulo will use the _Component_ > definition the most. The other definitions listed here are useful most when > you want to extend Modulo with custom JavaScript behavior, or integrate with > third party code. ## The outermost core definition The outermost definition is always Modulo -- this is what "kicks off" the entire project. This is the `<script Modulo ...` or the `<template Modulo>` you might see at the top of a Modulo project. - See the ["Modulo" core definition page](modulo.html) for information on the top-level _Modulo_ definition and the various options for embedding ## The next core definitions After that, most Modulo projects will have one or more of the following definitions, along with a summary of each: 1. [Configuration](configuration.html) _and_ [Include](configuration.html) - *(Extending or configuring Modulo and including third-party JavaScript libraries)* 2. [Library](library.html) - *(Importing component libraries with non-conflicting namespaces or aliases)* 3. [Artifact](artifact.html) - *(Customizing build behavior or specifying additional build artifacts)* 4. [Component](component.html) - *(Registering web components, each in turn comprising of a collection of component parts)* Conventionally, they are typically listed in the order supplied above, although in some situations you might find it necessary to change the ordering because of sepcific needs, since Modulo processes definitions from top-to-bottom (e.g., the `Configuration` tags behave much like how the browser processes `<script>` tags in an HTML document).