lockandload
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "lockandload", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Minimalist AMD-compliant Javascript and CSS loader", | ||
@@ -5,0 +5,0 @@ "main": "index.html", |
@@ -17,2 +17,3 @@ <h1>lockandload</h1> | ||
(which is also one of the reasons to handminify it only). | ||
- Because it is inlined, it is faster than all other loaders. | ||
- Fully asynchronous script loader: AMD-compatible. | ||
@@ -23,3 +24,4 @@ - Supports anonymous define() calls. | ||
- Does not support implicit nor explicit exports/module dependencies. | ||
- Circular dependencies will silently hang in unresolved state. | ||
- Circular dependencies will silently hang in unresolved state | ||
(or put differently: do not do that). | ||
- No extra diagnostic code to minimise code weight and optimise loading speed. | ||
@@ -46,10 +48,50 @@ - Fully event driven, no polling timers. | ||
The `index.html` contains two `<script>` sections. The first section | ||
should not be placed earlier or later in the page than it currently is. | ||
The second section must be placed at or close to the end of the `<head>`, | ||
should not be preceded by any other `<script>` tags. | ||
The second section should be placed at or close to the end of the `<head>`, | ||
and should not precede any direct `<link type="stylesheet">` tags. | ||
The basic structure of a page should be: | ||
- html | ||
- head | ||
- Charset declaration. | ||
- Inline `lockandload` master script. | ||
- High priority async external scripts. | ||
- Viewport declaration. | ||
- High priority CSS scripts. | ||
- `<title>`. | ||
- All other tags that should go in the `<head>`. | ||
- Inline `lockandload` 'headready' script. | ||
- Low priority CSS scripts. | ||
- Low priority async Javascript scripts. | ||
- Low priority synchronous Javascript scripts. | ||
- body | ||
- All other inline scripts (if you must). | ||
The `index.html` file is a production-stripped version of `annotated.html`. | ||
Look at `annotated.html` to understand the code and read additional | ||
inline documentation. | ||
## API | ||
Globally: | ||
- `define()`<br /> | ||
The standard AMD global entrypoint. To figure out module ids of all | ||
the modules that you are trying to load, uncomment some debugging code | ||
in the primary load script and inspect your console-pane in the browser. | ||
Locally in the secondary `localandload` 'headready' script; all path arguments | ||
are used verbatim in `<link href="path">` or `<script src="path">` tags: | ||
- `css(path)`<br /> | ||
Loads additional low priority ordered css files asynchronously. | ||
- `js(path)`<br /> | ||
Loads additional low priority unordered Javascript files asynchronously. | ||
- `sjs(path)`<br /> | ||
Loads additional low priority ordered Javascript files sequentially | ||
yet asynchronously (as a group). | ||
## References | ||
- To install it use the | ||
[npm repository](https://www.npmjs.com/package/lockandload). | ||
- [source repository](https://github.com/BuGlessRB/lockandload). | ||
- [Asynchronous Module Definition | ||
@@ -56,0 +98,0 @@ (AMD)](https://github.com/amdjs/amdjs-api/blob/master/AMD.md). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14249
105