Giter VIP home page Giter VIP logo

fusion-cli's Introduction

fusion-cli

Build status

The CLI interface for Fusion.js

The fusion-cli package is responsible for orchestrating compile-time configuration for server and browser bundles, as well as development, test and production variations. It provides a standardized Babel configuration that includes async/await support as well as stage 3+ Ecmascript features.

Due to the complexity involved in configuring many permutations of configurations, Fusion.js does not support custom webpack.config. This design decision allows Fusion.js to eventually move away from Webpack if faster and better bundlers become available. Additionally, it allows Fusion.js to make changes to the internal webpack configuration without the concern of breaking users customizations. If you run into a situation where you feel you need to make a webpack customization, please reach out to us on slack or create an issue describing your use case.

The CLI is also responsible for hot module reloading in development mode, and for running the web server.

Installation

yarn add fusion-cli

CLI API

The CLI API can be most easily run through the Yarn or NPX CLI, e.g. yarn fusion build or npx fusion build.

  • fusion build [dir] [--production] [--log-level] Builds your application assets

    This command generates transpiled javascript/source map files (aka assets, artifacts) for browser and server. By default it builds development assets, but can also build test and production assets, given the respective flags.

    Build artifacts are stored in the .fusion directory.

    • --production: Build production assets
    • --log-level: Log level to output to console [default: "info"]
  • fusion dev [dir] [--port] [--no-hmr] [--test] [--log-level] [--forceLegacyBuild] Builds development assets and runs the application in development mode

    Note that this command only builds browser artifacts in memory, and it doesn't save them to the filesystem. This allows hot module reloading to occur faster since there's no performance cost due to I/O access.

    • --port: The port on which the application runs [default: 3000]
    • --no-hmr: Run without hot modules replacement
    • --test: Run tests as well as application
    • --log-level: Log level to output to console [default: "info"]
    • --forceLegacyBuild: Force enable legacy build. By default not compiled in dev.
    • --perserve-names: Disable name mangling during script minification

Webpack stats.json file

Building an app generates a .fusion/stats.json file, which can be used with webpack-bundle-analyzer

fusion-cli's People

Contributors

albertywu avatar alexmsmithca avatar angus-c avatar blackswanny 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 uberopensourcebot avatar vicapow avatar

Watchers

 avatar  avatar

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.