meteor-skeleton | simple boilerplate for creating Meteor applications | Caching library
kandi X-RAY | meteor-skeleton Summary
kandi X-RAY | meteor-skeleton Summary
A simple boilerplate for creating Meteor applications with Blaze and SASS
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of meteor-skeleton
meteor-skeleton Key Features
meteor-skeleton Examples and Code Snippets
Community Discussions
Trending Discussions on meteor-skeleton
QUESTION
I'm new working with Meteor, I'm trying to import a javascript file: skel.min.js, skel-layout.min.js and skel-viewport.min.js into a project.
The 3 files are on the client/js path (client/js/skel.min.js
, client/js/skel-layout.min.js
and client/js/skel-viewport.min.js
).
I have the base layout in "client/baseLayout/baseLayout.js" and I deliver as follows:
...ANSWER
Answered 2017-Oct-11 at 04:25Looks like the issue isn't your code that you posted, but when Meteor eagerly loads files it does two things.
- It loads them alphabetically, so
skel-layout
is running beforeskel.min
which is the error in your console.skel.min
needs to run first. - It wraps them in a new closure, so they don't pollute the global namespace.
In addition to that, because skel.min
uses the UMD pattern and Meteor uses common.js, it registers itself with the module loader so it can be called with require()
, instead of loading itself onto the window global.
Looking at the code in the skel
repo, skel-layout
and skel-viewport
doesn't use UMD or attempt to require()
or import
skel, it just expects it to be available in the current scope.
In other words. Skel have half-arsed their module pattern.
Thankfully there's a quick fix.
Put all three files in the client/compatibility
folder and prefix the names with the load order:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install meteor-skeleton
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page