Giter Club home page Giter Club logo

chiasm-bundle's Introduction

chiasm-bundle

Work in progress, not working yet.

A tool for creating a production-ready bundle of Chiasm and its plugins.

The goal is that Chiasm plugins will each live in their own separate repositories, and this tool will be able to produce bundles that include a specific set of plugins.

Requirements

This is a draft of the requirements for the Chiasm-bundle tool.

Users should be able to specify:

  • a list of Chiasm plugins to include in the bundle, and
  • a list of dependencies to exclude from the bundle and instead shim (e.g. D3, Lodash)

By running some command, the following should happen:

  • specified Chiasm plugins should be installed from a registry
  • a UMD bundle should be created that exposes a distribution of Chiasm with the speficied plugins available to configurations.

Implementation

Several tools can fetch packages:

  • NPM
  • Bower
  • JSPM

Several tools can create bundles:

  • Browserify
  • WebPack
  • JSPM
  • Esperanto / Rollup

We assume that Chiasm plugins will depend on third party modules, therefore a combination of tools that makes it easy to resolve transitive dependencies is preferred. NPM seems like the most stable and straightforward solution for this.

Chiasm-bundle will need to take as input a set of plugins, and based on that, dynamically install those plugins and produce a top-level JS module that includes all of them. Since NPM already uses package.json to specify a list of dependencies, Chiasm-bundle can leverage that as the means to specify a collection of Chiasm plugins.

If package.json is used to specify a collection of Chiasm plugins to include in the bundle, the Chiasm-bundle tool can read that file and dynamically generate a top-level JS module for the bundle that includes all of them via require() statements and makes them available to the Chiasm runtime.

Once the top-level JS module for the bundle is generated, Browserify can be used to generate the complete bundle using that module as the entry point.

Since Browserify supports shims for browser globals via browserify-shim, Chiasm-bundle can leverage its shim configuration options, which are conveniently embedded within package.json.

chiasm-bundle's People

Watchers

 avatar  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.