https://github.com/numtel/meteor-component-example
Load templates on-demand using miro:preloader and numtel:publicsources
https://github.com/numtel/meteor-component-example
Last synced: about 1 year ago
JSON representation
Load templates on-demand using miro:preloader and numtel:publicsources
- Host: GitHub
- URL: https://github.com/numtel/meteor-component-example
- Owner: numtel
- Created: 2015-01-19T02:50:56.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-31T10:26:28.000Z (almost 11 years ago)
- Last Synced: 2025-03-04T07:51:20.236Z (about 1 year ago)
- Language: JavaScript
- Homepage: http://lazy-load-example.meteor.com/
- Size: 168 KB
- Stars: 38
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Meteor Component Example
## Notice
**:new: This example has been made obsolete by the new [`numtel:lazy-bundles` package](https://github.com/numtel/meteor-lazy-bundles).**
This example recreates the default Meteor "Hello" counter except with the templates loaded on-demand using [`miro:preloader`](https://github.com/MiroHibler/meteor-preloader) and [`numtel:publicsources`](https://github.com/numtel/meteor-publicsources).
## Explanation
Meteor provides a great system for building templates with Blaze and Spacebars but large applications suffer because every template is loaded with the initial page load.
Instead of loading all templates on initial page load, it is possible to load templates as-needed using `iron:router` with a few supporting packages.
With `numtel:publicsources`, source files inside the `public` directory can be processed using the same packages that process all other source files.
See [`site.publicsources.json`](site.publicsources.json) for the configuration of the lazy-loaded bundle.
## Installation
```bash
# Install Meteor
$ curl https://install.meteor.com/ | sh
# Clone Repo
$ git clone https://github.com/numtel/meteor-component-example.git
$ cd meteor-component-example
# Start Meteor
$ meteor
```
## Resources
* [`numtel:privatesources` package](https://github.com/numtel/meteor-privatesources) - Create bundles for lazy-loading components, with authentication
## License
[Unlicense](http://unlicense.org/)