Coder Social home page Coder Social logo

systemjs-config-builder's Introduction

SystemJS Config Builder

Generate SystemJS config files from node_modules

Overview

The easiest way to include modules in SystemJS is currently through JSPM. This project aims to provide an alternative, by leveraging the deterministic installs of Yarn (also works with npm) and generating config files to explain to SystemJS how to resolve modules from node_modules.

Roadmap

  • Trace node_modules and build registry
  • Generage compatability configs for packages
  • Generate valid SystemJS config file
  • Make sure loading React.JS works
  • Cache registry (to speed up subsequent generations)
  • Use own @node polyfills. See #1 for progress
  • Respect jspmPackage: true
  • Perform path optimisations (nm: -> node_modules), for smaller configs
  • Fully support npm resolve algorithym (upper node_module and single dep node_modules)
  • Allow simple local overrides
  • Use JSPM overrides
  • Allow dependency filtering (so we don't include deps meant for just the server)
  • Provide CLI flag to optimize generated.config.js
  • Allow configurability
  • Make more robust

Currently, given this package.json, SystemJS Config Builder generates this config.

Usage

You can test the generation via the cli in systemjs-tools.

yarn global add systemjs-tools

add SystemJS @node browser polyfills

yarn add systemjs-nodelibs

and generate the config

systemjs config

optionally you can also add a postinstall hook to do this automatically

package.json

{
  "scripts": {
    "postinstall": "systemjs config"
  }
}

Thanks

Thanks to Juha Järvi for helping me flesh out this idea and for the discussions regarding his awesome cbuild project.

systemjs-config-builder's People

Contributors

alexisvincent avatar frederikschubert avatar srolel 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.