imp
v0.1.1

Docs

  • CLI - The imp CLI is a complete toolkit for an imp app. One binary holds a static dev server, a dependency manager, a linter and a formatter. imp is built for the...
  • Configuration (`imp.json`) - The only config file you write is imp.json, at your project root. It is optional. Every command works without it.
  • Imports - Everything imp gives you arrives through a bare specifier that imp resolves for you. In development it uses the import map imp start injects. In production...
  • Rendering - This page explains how imp turns a call to an element factory into real DOM. imp is buildless. There is no compile step and no JSX. Your code is plain...
  • Components - A component is how imp gives your UI a lifecycle. An imp component is a real web component. It is a custom element with a name that you choose, and its...
  • Custom components - The standard library covers the controls most apps share: a button, a form, a dialog, a card. It does not cover everything. A kanban board, a product tile,...
  • Standard components - imp ships a component library, and you import it from imp/std. There is no UI package to add, no CSS file to include, and no build step to configure:
  • Accessibility - An app that you build from the standard components clears the common WCAG bar. You write no ARIA, no focus handling and no keyboard handling for it....
  • State - imp gives an app shared, reactive state. A component initializes a named state. Every component that mounts under it uses the same state by name. There is...
  • Routing - imp gives a single-page app client-side routing. It maps a URL to a screen, changes the screen on a navigation, and loads a section that people rarely visit...
  • Theming - Every imp app is themable by default. A theme is a plain JavaScript file that you write. List your themes in init, and imp skins your app. A change to...
  • Translations - Every imp app is translatable by default. Your translations are plain JavaScript files that you write. t('some.key') finds a message in them. The current...
  • HTTP - imp gives you a configured HTTP client, so your app talks to its backend and you write no fetch wrapper. Describe the network layer once, with a base URL,...
  • Logging - imp has a small built-in logger. The library sends all of its own diagnostics through it, and your app can import the same logger for its own messages....
  • Analytics - imp tells you which parts of your UI people see and use. It counts each page view, each zone that comes into view, each zone that the person uses, each...
  • Build flags - A build flag turns part of your app on or off, per environment. The new checkout can be on in development and off in production, until the day you turn it...
  • Testing - imp test is the built-in test runner of imp. It covers two levels of testing, through one command and one import:
  • Linting - imp lint checks your code with a standard recommended rule set, and with the rules of imp. The linter is part of the imp binary. There is nothing to install...
  • Formatting - imp fmt formats your whole project with one command. It formats JavaScript, JSON, Markdown, CSS, HTML, SVG, XML, SQL, and YAML, all with the same options....
  • Managing dependencies - imp vendors your dependencies. imp install downloads a package and bundles it into a single minified module that the browser can run. It stores that bundle...
  • Deploying an app - imp build writes a folder of static files. Any host that serves files can serve it. This page tells you what the host must do with those files: the deep...
  • Browser support - imp runs on the current stable version of Chrome, Edge, Firefox, and Safari. That is the whole policy. There is no support matrix, no minimum version to...

For complete apps that are built with imp, see imp-examples. Two of them run live: Beacon, an observability SPA, and Brickfall, a game that installs as a PWA.