Elmo is the web framework I've been using to create websites for the last 2 years. I'm currently porting the framework over from a private repository and adding tests and some functionality as I go.


Keywords
preact, webpack
License
MIT
Install
npm install elmo@2.1.3

Documentation

Elmo

Elmo is the web framework I've been using to create websites for the last 2 years. I'm currently porting the framework over from a private repository and adding tests and some functionality as I go.

You can learn more about the project here: https://elmo-www.netlify.com/.

I'm open sourcing this earlier than normal to hopefully get some feedback from you earlier on. The structure is in place and the pieces that do exist are well-tested. The CLI is not yet functional.

Right now there's not a lot of documentation, but the tests should give a good sense of what each of the parts do. The goal of this project is break apart the framework into digestible, self-contained bits. You'll see from the tests that each test is fairly self-contained from the rest of the framework. This makes it easier to test and should make the system easier to understand.

This will be my last major open source project for the frontend. I intend to maintain elmo until WASM is mature enough to replace JS workflows. I'd imagine this will take another 5 years. At this point, we'll need to decide if Elmo (and Javascript in general) still make sense. If Elmo does ever goes into maintainence mode, it will still receive bug fixes, but will no longer be accepting new features.

Ready to Use

  • Finish elmo bundle
  • Finish elmo serve
    • Finish adding HMR
  • Add <Style /> component
    • Extract essentials from styled-jsx
  • Add remaining Router features
    • onpopstate support
    • Test 500 errors and runtime errors
  • static/ directory
    • Bundle static/ directory with build
  • Add unfetch and node-fetch and test fetch
  • Add precommit hook
  • Cleanup misc files and package.json
  • Write the prepublish script
  • Add <Link /> component
  • Add babel-macro
  • Saucelabs testing for IE11, Firefox, Safari
    • Setup testdriver to run some tests locally
    • Migrate browser tests to webdriver
    • Add Promise polyfill
    • Add babel-env in production
  • Add elmo analyze to get bundle sizes
    • Analyze included dependencies
    • Test tree-shaking and minification
  • Support reading from elmo/env to override defaults
  • Support raw .js files as executable bundles
  • Add pre-publish hook

At this point, I'll start publishing to elmo since the runtime and building static websites will be stable.

For 1.0, there's just a few more features needed to round out the experience.

1.0

  • Support reading from elmo/routes to override default
  • Support reading from elmo/router to override default
  • Support reading from elmo/fetch to override default
  • Support reading from elmo/log to override default console[type]
  • Add elmo build
    • Generate a custom server for SSR, ideally this can be conditionally routed to for certain pages
  • Add elmo new to bootstrap a project
  • Add Typescript compiler
  • Test watching the static/ directory
  • Double-check TODOs in the code

Ideas

  • Add an elmo test that helps you test your pages easily
  • Redirect when the server responds with {4,5}xx but routing tells us we have a page
  • Create an elmo-test package to aid elmo-supported third-party modules
  • Consider adding a <Markdown /> component that behaves like the <Style /> component
    • Maybe support reading from components/xxx.transform.js that run it's children through a build-step.
  • Consider adding a <Context /> component
  • Consider adding a dlv as get
  • Consider adding isomorphic cookie support
  • Consider adding isomorphic flash message support
  • Support upcoming Preact X
  • CI testing

Developing

I spent a lot of time trying to make it easy to develop and test Elmo. Each test builds the source code it needs to run the test use mocha without any additional build steps. There are also steps to test browser code via puppeteer. You can find the various test utilities in lib/testutil

Here's how to download and run all the tests:

git clone github.com/matthewmueller/elmo
make test

License

MIT