1.6.0 • Published 8 years ago

systemjs-route-bundler v1.6.0

Weekly downloads
63
License
-
Repository
github
Last release
8 years ago

SystemJS Route Bundle Builder Codacy Badge Dependency Status devDependency Status

Magical code to split your SystemJS project into bundles based on singple-page application top level routes. SystemJS builder is used under the covers.

Instead of generating a single giant .js file for your entire application, you get one .js file per route and potentially one more file per route that contains shared dependencies.

Imagine that you have 3 routes that each import two different dependencies. 2 routes share the same dependency.

/route1
  /dependency1
/route2
  /dependency1
/route3
  /dependency2

This would give you 5 separate .js files (3 for the routes and 2 for the dependencies). Two routes both share a dependency, therefore loading /route2 would only load one file if /route1 has already loaded (thanks to browser caching).

By pairing things with the ocLazyLoad SystemJS Router, as users click around in your app and load routes, the related files for those routes are lazy loaded as needed. This cuts down on initial application load times.

Configuration

Check the AngularJS + SystemJS seed project for an example configuration.

OptionDescription
baseURLBase URL of the project
destDestination folder for the output
mainThe main file of your application
destMainThe destination folder of your main file
routesAn array of the file names of the main routes of your project. Each of the routes will have its own bundle
bundleThresholdThe ratio of routes including a module over which the module will be bundled in the main bundle. Value must been between 0 and 1. 0.6 means that if 60% of the routes contain a single module, that module will be bundled in the main bundle
systemConfigPath to the systemjs config file
sourceMapsBuild sourceMaps for the bundles
minifyMinify the javascript
mangleMangle javascript variables
verboseOutputOutput debug information while tracing and bundling
ignoredPathsPaths that will not be bundled. Put all paths that contain external libraries here

Used by

Credits

systemjs-route-bundler is a Swimlane open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.

1.6.0

8 years ago

1.5.1

8 years ago

1.5.0

8 years ago

1.1.4

9 years ago

1.4.2

9 years ago

1.4.1

9 years ago

1.4.0

9 years ago

1.1.3

9 years ago

1.3.6

9 years ago

1.3.5

9 years ago

1.1.2

9 years ago

1.3.4

9 years ago

1.3.3

9 years ago

1.3.2

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago

1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago