Skip to content

Commit

Permalink
change register/registerDynamic back to System object
Browse files Browse the repository at this point in the history
  • Loading branch information
b-strauss committed Nov 25, 2016
1 parent 291b116 commit f7b8a40
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SystemJS
Universal dynamic module loader - loads ES6 modules, AMD, CommonJS and global scripts in the browser and NodeJS.

* [Loads any module format](docs/module-formats.md) with [exact circular reference and binding support](https://github.com/ModuleLoader/es6-module-loader/blob/v0.17.0/docs/circular-references-bindings.md).
* Loads [ES6 modules compiled into the `SystemJS.register` bundle format for production](docs/production-workflows.md), maintaining circular references support.
* Loads [ES6 modules compiled into the `System.register` bundle format for production](docs/production-workflows.md), maintaining circular references support.
* Supports RequireJS-style [map](docs/overview.md#map-config), [paths](https://github.com/ModuleLoader/es6-module-loader/blob/master/docs/loader-config.md#paths-implementation), [bundles](docs/production-workflows.md#bundle-extension) and [global shims](docs/module-formats.md#shim-dependencies).
* [Loader plugins](docs/overview.md#plugin-loaders) allow custom transpilation or asset loading.

Expand Down Expand Up @@ -48,7 +48,7 @@ Basic Use
</script>
```

The above will support loading all module formats, including ES Modules transpiled into the SystemJS.register format.
The above will support loading all module formats, including ES Modules transpiled into the System.register format.

To load ES6 code with in-browser transpilation, configure one of the following transpiler plugins:

Expand Down
2 changes: 1 addition & 1 deletion docs/config-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ In the above any require to `dependencyA` or `dependencyB` will first trigger a

It is an alternative to including a script tag for a bundle in the page, useful for bundles that load dynamically where we want to trigger the bundle load automatically only when needed.

The bundle itself is a module which contains named SystemJS.register and define calls as an output of the builder. The dependency names the bundles config lists should be the same names that are explicitly defined in the bundle.
The bundle itself is a module which contains named System.register and define calls as an output of the builder. The dependency names the bundles config lists should be the same names that are explicitly defined in the bundle.

#### defaultJSExtensions

Expand Down
6 changes: 3 additions & 3 deletions docs/module-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following module formats are supported:
* `cjs`: [CommonJS](#commonjs)
* `amd`: [Asynchronous Module Definition](#amd)
* `global`: [Global shim module format](#globals)
* `register`: [SystemJS.register](system-api.md#systemregister-name-deps-declare) or [SystemJS.registerDynamic](system-api.md#systemregisterdynamic-name-deps-executingrequire-declare) compatibility module format
* `register`: [System.register](system-api.md#systemregister-name-deps-declare) or [System.registerDynamic](system-api.md#systemregisterdynamic-name-deps-executingrequire-declare) compatibility module format

The module format can be set via meta configuration:

Expand All @@ -26,8 +26,8 @@ When the module format is not set, automatic regular-expression-based detection
This module format detection is never completely accurate, but caters well for the majority use cases.

The module format detection happens in the following order:
* _SystemJS.register / SystemJS.registerDynamic_
If the source code starts with a number of comments, followed by `SystemJS.register` or `SystemJS.registerDynamic` as the first line of code.
* _System.register / System.registerDynamic_
If the source code starts with a number of comments, followed by `System.register` or `System.registerDynamic` as the first line of code.
* _ES modules_
The source is only detected as an ES module if it contains explicit module syntax - valid `import` or `export` statements.
* _AMD modules_
Expand Down
2 changes: 1 addition & 1 deletion docs/production-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The bundle extension will automatically download a bundle as soon as an attempt
// will delegate to the bundle and only a single request is made
```

A built file must contain the exact named defines or named `SystemJS.register` statements for the modules
A built file must contain the exact named defines or named `System.register` statements for the modules
it contains. Mismatched names will result in separate requests still being made.

### CSP-Compatible Production
Expand Down
10 changes: 5 additions & 5 deletions docs/system-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ Given a plain JavaScript object, return an equivalent `Module` object.

Useful when writing a custom `instantiate` hook or using `SystemJS.set`.

#### SystemJS.register([name ,] deps, declare)
#### System.register([name ,] deps, declare)
Type: `Function`

Declaration function for defining modules of the `SystemJS.register` polyfill module format.
Declaration function for defining modules of the `System.register` polyfill module format.

[Read more on the format at the loader polyfill page](https://github.com/ModuleLoader/es6-module-loader/blob/v0.17.0/docs/system-register.md)

#### SystemJS.registerDynamic([name ,] deps, executingRequire, declare)
#### System.registerDynamic([name ,] deps, executingRequire, declare)
Type: `Function`

Companion module format to `SystemJS.register` for non-ES6 modules.
Companion module format to `System.register` for non-ES6 modules.

Provides a `<script>`-injection-compatible module format that any CommonJS or Global module can be converted into for CSP compatibility.

Expand All @@ -108,7 +108,7 @@ module.exports = require('pkg/module');
Can be written:

```javascript
SystemJS.registerDynamic(['pkg/module'], true, function(require, exports, module) {
System.registerDynamic(['pkg/module'], true, function(require, exports, module) {
module.exports = require('pkg/module');
});
```
Expand Down

0 comments on commit f7b8a40

Please sign in to comment.