Giter VIP home page Giter VIP logo

fusion-cli's Introduction

Modern framework for fast, powerful React apps

Build status fusion-core Downloads

What is it?

fu·sionnoun

The process or result of joining two or more things together to form a single entity.

Fusion.js, Uber’s open source universal web framework, represents the fusion of the client and the server. It's geared for server-side rendering out of the box, and its plugin-driven architecture allows for complex frontend and backend logic to be encapsulated in a single plugin:

import App from 'fusion-react';
import Router from 'fusion-plugin-react-router';

export default () => {
  const app = new App(<div>...</div>);

  /*
  One line of code sets up everything you need for routing:
  - Server rendering
  - React Providers on both server and browser
  - Bundle splitting integration
  - Hot module reloading support
  */
  app.register(Router);

  return app;
}

We initially built Fusion.js to make our own websites easier to maintain, but were so impressed with the benefits that we decided to offer it to the community as an open source project!

Try it out

If you're interested in giving Fusion.js a shot, Overview and Core Concepts are great places to start.

Contributing

This is a monorepo of all open source Fusion.js packages maintained using Yarn v2. Take a look at CONTRIBUTING.md for info on how to develop in this repo.

License

MIT

fusion-cli's People

Contributors

albertywu avatar alexmsmithca avatar angus-c avatar blackswanny avatar cdlewis avatar chrisdothtml avatar dennisgl avatar derekjuber avatar ganemone avatar kevingrandon avatar ksheedlo avatar lassedamgaard avatar lhorie avatar lxe avatar nadiia avatar rajeshsegu avatar renovate-bot avatar renovate[bot] avatar rtsao avatar samundrak avatar swojit avatar thegleb avatar uberopensourcebot avatar vicapow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fusion-cli's Issues

Document polyfill costs

Fort internal release we're adding all polyfills for all core-js/ES6 and core-js/ES7. The concern is that these will be expensive and make it harder for apps to take full advantage of the performance release.

Fully document the cost of polyfills.

Expose context to renderer initialization

I'm trying to write a custom renderer for fusion (replacement of fusion-react), and in order to SSR I need to be able to extract information from the context during the request.

Sorry if this is already supported, I haven't been able to figure out the best way to thread context through to the renderer initialization.

Support colocated unit tests

It is currently enforced that unit tests live in a top-level tests directory. This can make it annoying to write unit tests, so instead, test directories should be able to exist anywhere in src/, colocated with appropriate code.

Support overriding the node environment in dev and test

It is a much better experience to have NODE_ENV overridden
when running fusion dev and fusion test than throwing.
In production, we should still error on the side of caution
and throw, however in dev/test it should suffice to log a warning

Issue with tests and chunk-id-loader

Due to the way we have dependencies between browser and node builds, the test build will fail if a server test entry imports a file that uses chunk-id-loader and no client entry imports the same file.

(server) ../fusion-cli/build/chunk-id-loader.js!./src/components/translations.js
Module build failed: Error: no result from manifest for /Users/ganemone/dev/graphene-example/src/components/translations.js
    at _generateSource (/Users/ganemone/dev/fusion-cli/build/chunk-id-loader.js:27:24)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
 @ ./src/components/translations.js 37:30-135
 @ ./src/__tests__/server.node.js
 @ ../fusion-cli/node_modules/multi-entry-loader?include[]=/Users/ganemone/dev/graphene-example/src/**/__tests__/*.js,exclude[]=/Users/ganemone/dev/graphene-example/src/**/__tests__/*.browser.js
 @ multi __SECRET_MULTI_ENTRY_LOADER__?include[]=/Users/ganemone/dev/graphene-example/src/**/__tests__/*.js,exclude[]=/Users/ganemone/dev/graphene-example/src/**/__tests__/*.browser.js

This brings up a broader issue of testability of code that includes virtual modules. We should fix this issue, and enumerate all our virtual modules and ensure that code that uses them is testable.

Annotate CLI commands correctly in yargs

yargs help is currently incomplete, given the arguments that are actually used by the handler functions. Unneeded options should be removed, options of the form no-something should be handled correctly, and other valid options should appear in --help

add more nyc reporters

We may like to make nyc reporters configurable(allow passing along --reporters) in the future, but for now, we want to ensure we have the followings:

  • text
  • html
  • cobertura

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.