Skip to content

jspm/jspm-packages

Repository files navigation

JSPM package website

Develop

  • chomp serve --watch or
  • chrome build --watch and run server.jsx in debug mode

Naming convention

Wrap uses of JSX component, with a valid custom element tag, composed of the jspm-packages-{imports[subpath] || importmap.imports[subpath]}.

Intention is to be compatible with API of compiling and using JSX Components to custom-elements https://nanojsx.io/docs.html#:~:text=root%27))-,CustomElementsMode,-You%20can%20easily

    import { Fragment, h } from "nano-jsx";
    import { Header } from "#header";
    import { Hero } from "#hero";

    function Home() {
        return (
            <Fragment>
            <jspm-packages-header>
                <Header search={false} />
            </jspm-packages-header>
            <main>
                <jspm-packages-hero>
                <Hero />
                </jspm-packages-hero>
            </main>
            </Fragment>
        );
    }

    export { Home };


// SSR Root / HTML document 
    <jspm-packages>
        render(<Home />
    </jspm-packages>

i.e. @jspm/packages/header || #header -> jspm-packages-header

credit

External link icons created by Moon.de - Flaticon

search icon by Icons8

Attention icon by Icons8 Save icons created by mavadee - Flaticon

Download icons created by Uniconlabs - Flaticon Copy icons created by Pixel perfect - Flaticon