Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michalzalecki/requirejs-example
https://github.com/michalzalecki/requirejs-example
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/michalzalecki/requirejs-example
- Owner: MichalZalecki
- Created: 2015-03-06T22:17:08.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-06T23:50:28.000Z (almost 10 years ago)
- Last Synced: 2024-10-25T12:38:03.316Z (3 months ago)
- Language: JavaScript
- Size: 221 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RequireJS example
Example of my approach when it comes to RequireJS. It differs from [requirejs/example-multipage](https://github.com/requirejs/example-multipage). I use absolute paths to be able to load modules independently from the current URL, but it will complicate working with [r.js](http://requirejs.org/docs/optimization.html), redefining paths will be needed. Also a structure is slightly different. I'm loading controllers not as defined modules (they aren't portable anyway), but using `src[data-main]` so I'm omitting additional script tags after loading require.js.