JSPM

fusion-cli

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 583
  • Score
    100M100P100Q101294F
  • License MIT

CLI

Package Exports

  • fusion-cli
  • fusion-cli/plugins/environment-variables-plugin

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fusion-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Fusion

Composable web framework for universally rendered applications, agnostic of virtualdom implementation. (TODO: Come up with a better one line description).

Motivations

Building a universally rendered virtualdom based web application can be a daunting task. To start you will need:

  • virtualdom implementation (react, preact, inferno, etc)
  • universal data fetching solution (react-prepare, react-async-bootstrapper, etc)
  • build tooling (webpack, browserify, rollup, etc)
  • code splitting
  • hot reloading
  • ... more things

Setting all these things up independently of one another is possible but difficult. Some solutions have come out to try and abstract these things away, such as create-react-app and next.js and react-server. However, they each only solve pieces of the puzzle, while leaving others either unsolved or unsolvable using their abstraction.

What is fusion?

Fusion consists of the following pieces

  • a cli and build system
  • a set of virtual modules which expose a minimal interface for interacting with the build system
  • a web server
  • a runtime which handles calling lifecycle methods

The implementations of the hyperlite lifecycle methods is what determines things like which virtualdom library will be used, how will data fetching work, etc.

We have provided scaffolds for common use cases, which you can use to get started.

  • [TODO react/redux/styletron](TODO: Link To Example)
  • [TODO preact/redux/styletron](TODO: Link To Example)

API

TODO document entrypoint(s) and exports here.

CLI

  • fusion build [dir] [--test] [--cover] [--production] [--log-level]
    • Build your appplication
    • --test: Build tests as well as application
    • --cover: Build tests (with coverage) as well as application
    • --production: Build production assets
    • --log-level: Log level to output to console [default: "info"]
  • fusion dev [dir] [--port] [--no-hmr] [--test] [--cover] [--log-level]
    • Run your application in development
    • --port: The port on which the application runs [default: 3000]
    • --no-hmr: Run without hot modules replacement
    • --test: Run tests as well as application
    • --cover: Run tests (with coverage) as well as application
    • --log-level: Log level to output to console [default: "info"]
  • fusion profile [--environment] [--watch] [--file-count]
    • Profile your application
    • --environment: Either production or development [default: "production"]
    • --watch: After profiling, launch source-map-explorer with file watch
    • --file-count: The number of file sizes to output, sorted largest to smallest (-1 for all files) [default: 20]
  • fusion start [--environment]
    • Run your application
    • --environment: Which environment/assets to run - defaults to first available assets among ["development", "test", "production"]
  • fusion test [--cover] [--watch] [--skip-build]
    • Run tests
    • --cover: Run tests with coverage
    • --watch: Use existing built assets
    • --skip-build: Automatically re-profile your application on changes

Virtual Modules

TODO: Merge or link to documentation here

assetUrl(filePath: string) => string

chunkId(filePath: string) => Array<string>

syncChunkIds() => Array<string>