MCPcopy
hub / github.com/preactjs/wmr

github.com/preactjs/wmr @3.8.0 sqlite

repository ↗ · DeepWiki ↗ · release 3.8.0 ↗
787 symbols 2,066 edges 465 files 104 documented · 13%
README

WMR

wmr logo

npm install size OpenCollective Backers OpenCollective Sponsors

The tiny all-in-one development tool for modern web apps, in a single 2mb file with no dependencies.

All the features you'd expect and more, from development to production:

🔨   No entry points or pages to configure - just HTML files with <script type=module>

🦦   Safely import "packages" from npm without installation

📦   Smart bundling and caching for npm dependencies

↻   Hot reloading for modules, Preact components and CSS

⚡️   Lightning-fast JSX support that you can debug in the browser

💄   Import CSS files and CSS Modules (*.module.css)

🔩   Out-of-the-box support for TypeScript

📂   Static file serving with hot reloading of CSS and images

🗜   Highly optimized Rollup-based production output (wmr build)

📑   Crawls and pre-renders your app's pages to static HTML at build time

🏎   Built-in HTTP2 in dev and prod (wmr serve --http2)

🔧   Supports Rollup plugins, even in development where Rollup isn't used

Quickstart (recommended)

Create a new project in seconds using create-wmr:

npm init wmr your-project-name

or

yarn create wmr your-project-name

illustration of installation to build for wmr

💁 If you'd like ESLint to be set up for you, add --eslint to the command. Note: this will use 150mb of disk space.

Check out the docs to learn more

Packages

Package Description Version
wmr Tiny all-in-one development tool for modern web apps wmr npm
create-wmr Create a new WMR project in seconds create-wmr npm
@wmrjs/directory-import Import a directory's files as an Array @wmrjs/directory-import npm
@wmrjs/nomodule Generate legacy fallback bundles for older browsers @wmrjs/nomodule npm
@wmrjs/service-worker Bundle service workers @wmrjs/service-worker npm
preact-iso Optimal code-splitting, hydration and routing for Preact preact-iso npm

Contributing

git clone git@github.com:preactjs/wmr.git
cd wmr
yarn

# run the demo (no compile)
yarn demo serve

# build and serve the demo for prod
yarn demo build:prod && yarn demo serve:prod

# build the single-file CLI:
yarn workspace wmr build

Adding a changeset

Don't forget to also include a changeset, by running this command at the root of the project:

yarn changeset

This will take you through a process of selecting the changed packages, the version updates and a description of the change. Afterwards, changesets, will generate a .md file inside a .changeset directory. Please commit that file as well.

After all that, you are good to go. :+1:

Extension points exported contracts — how you extend this code

LocationHook (Interface)
(no doc)
packages/preact-iso/router.d.ts
Request (Interface)
(no doc)
packages/wmr/types.d.ts
ContentHeading (Interface)
(no doc)
docs/global.d.ts
RoutableProps (Interface)
(no doc)
packages/preact-iso/router.d.ts
Plugin (Interface)
(no doc)
packages/wmr/types.d.ts
ContentItem (Interface)
(no doc)
docs/global.d.ts
RouteProps (Interface)
(no doc)
packages/preact-iso/router.d.ts
Options (Interface)
(no doc)
packages/wmr/types.d.ts

Core symbols most depended-on inside this repo

loadFixture
called by 196
packages/wmr/test/test-helpers.js
runWmrFast
called by 135
packages/wmr/test/test-helpers.js
getOutput
called by 114
packages/wmr/test/test-helpers.js
push
called by 114
packages/wmr/src/lib/acorn-traverse.js
withLog
called by 92
packages/wmr/test/test-helpers.js
get
called by 75
packages/wmr/src/lib/acorn-traverse.js
runWmr
called by 66
packages/wmr/test/test-helpers.js
resolve
called by 48
packages/wmr/src/plugins/wmr/client.js

Shape

Function 663
Method 60
Class 33
Interface 31

Languages

TypeScript100%

Modules by API surface

packages/wmr/src/lib/acorn-traverse.js93 symbols
packages/wmr/src/lib/rollup-plugin-container.js27 symbols
packages/wmr/test/acorn-traverse.test.js22 symbols
packages/wmr/src/plugins/optimize-graph-plugin.js22 symbols
packages/wmr/src/plugins/wmr/client.js21 symbols
packages/wmr/test/test-helpers.js19 symbols
packages/wmr/types.d.ts18 symbols
packages/wmr/src/lib/output-utils.js16 symbols
packages/wmr/src/wmr-middleware.js12 symbols
packages/wmr/src/plugins/npm-plugin/registry.js12 symbols
packages/wmr/src/plugins/less-plugin.js11 symbols
packages/wmr/src/lib/transform-jsx-to-htm-lite.js11 symbols

Dependencies from manifests, versioned

@babel/core7.13.10 · 1×
@babel/plugin-transform-modules-commonjs7.13.8 · 1×
@babel/standalone7.11.6 · 1×
@changesets/changelog-github0.2.7 · 1×
@changesets/cli2.12.0 · 1×
@lhci/cli0.7.0 · 1×
@rollup/plugin-alias3.1.5 · 1×
@rollup/plugin-commonjs14.0.0 · 1×
@rollup/plugin-dynamic-import-vars1.4.0 · 1×
@rollup/plugin-json4.1.0 · 1×
@rollup/plugin-node-resolve11.2.0 · 1×
@rollup/plugin-replace3.0.0 · 1×

For agents

$ claude mcp add wmr \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact