Comments (11)
This is now in the docs.
from vex.
Can you be more specific about what you mean when you you can't make it work with requireJS?
Including vex.js and vex.dialog.js (in that order) should be equivalent to including vex.combined.js.
from vex.
It does work by including vex and vex.dialog separately. But I can't not make it work using vex.combined. when using vex.combined only the main vex object get exposed but not vex.dialog. is this a known bug ?
from vex.
Still hoping to get that figured out if i have to go to production with this.. Are you aware of this issue or I am doing something wrong.
from vex.
Sorry, my previous statement was incorrect. The vex.combined.min.js file has two define
statements in it, so it cannot be used with RequireJS. We will add a note to the docs stating this.
If your goal is to use vex.dialog
, you should be able to just require that, since it itself requires vex
. If you need to use both vex
and vex.dialog
, you'll need to require them separately. There really would be no good way of requiring them as a single statement since they are separate modules. Hope this helps!
from vex.
Ok thanks, would love to seem the AMD version only expose one object tho
from vex.
@m4nuC can you elaborate?
from vex.
I meant just having one object exposed in the vex.combined.min to make it usable when using AMD. Obviously not a big deal but that would to me look a bit nicer in my list of dependencies.
from vex.
Unfortunately (and @zackbloom or @timmfin please correct me if i'm wrong), I believe the only way to accomplish this would be to actually combine the source code of vex.coffee
and vex.dialog.coffee
, thus limiting others' ability to depend on only one or the other separately.
Generalized, this is an interesting AMD question, and one I'd certainly like an answer to: Can one structure her code such that modules A and B (in which B depends on A) can be required as a single module C or individually as modules A and B respectively? If you figure it out, please report back and let us know. 😉
from vex.
Well can't module C require B (which require A) and then just expose a C module that can itself expose B module through a member on itself ? I would try it out but I am not exactly a coffee scripter :(
from vex.
That sounds reasonable. I can give it shot next week. Thanks!
from vex.
Related Issues (20)
- HTML entities in unsafeMessage/unsafeContent
- is it possible to open vex over a canvas ?
- Help moving vex and using append location
- vex-open remains on body in chrome if dialog is closed in background with child browser window & print dialog is called (then print cancelled or proceed) HOT 1
- vex input field sanitizes spaces
- Multiple Buttons?
- problem with the modal position and size HOT 1
- how to use it in Vue? HOT 2
- readme spelling error
- file input inside vex.open() HOT 1
- Dynamic select using AngularJS with ng-options
- vex.close could cover submission
- demos in documentation don't work
- button click opens and closes dialog at the same time HOT 2
- Can Vex Modal lock? HOT 1
- Unsafe assignment to innerHTML
- Animations required for close
- Make buttons respond to Enter and Esc keys
- Refresh buttons of a dialog confirm HOT 1
- vex dialog buttons are not working as expected. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vex.