Make RequireJS work with can.import #1456

Closed
matthewp opened this Issue Feb 18, 2015 · 8 comments

Comments

Projects
None yet
3 participants
@matthewp
Contributor

matthewp commented Feb 18, 2015

No description provided.

@matthewp matthewp self-assigned this Feb 18, 2015

@matthewp matthewp added this to the 2.2.0 milestone Feb 18, 2015

@matthewp

This comment has been minimized.

Show comment
Hide comment
@matthewp

matthewp Feb 19, 2015

Contributor

Looks like there is already code: https://github.com/bitovi/canjs/pull/1396/files#diff-95ad04d772620344cfa50f85ba7adb64R96

I guess we just need a test to verify it is working?

Contributor

matthewp commented Feb 19, 2015

Looks like there is already code: https://github.com/bitovi/canjs/pull/1396/files#diff-95ad04d772620344cfa50f85ba7adb64R96

I guess we just need a test to verify it is working?

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Feb 19, 2015

Contributor

It doesn't work.

Sent from my iPhone

On Feb 19, 2015, at 6:00 AM, Matthew Phillips notifications@github.com wrote:

Looks like there is already code: https://github.com/bitovi/canjs/pull/1396/files#diff-95ad04d772620344cfa50f85ba7adb64R96

I guess we just need a test to verify it is working?


Reply to this email directly or view it on GitHub.

Contributor

justinbmeyer commented Feb 19, 2015

It doesn't work.

Sent from my iPhone

On Feb 19, 2015, at 6:00 AM, Matthew Phillips notifications@github.com wrote:

Looks like there is already code: https://github.com/bitovi/canjs/pull/1396/files#diff-95ad04d772620344cfa50f85ba7adb64R96

I guess we just need a test to verify it is working?


Reply to this email directly or view it on GitHub.

@matthewp

This comment has been minimized.

Show comment
Hide comment
@matthewp

matthewp Feb 19, 2015

Contributor

Interesting, is there an existing demo page or something to test with? Otherwise I'll create one.

Contributor

matthewp commented Feb 19, 2015

Interesting, is there an existing demo page or something to test with? Otherwise I'll create one.

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Feb 19, 2015

Contributor

There's a test page for steal's integration.

Sent from my iPhone

On Feb 19, 2015, at 7:46 AM, Matthew Phillips notifications@github.com wrote:

Interesting, is there an existing demo page or something to test with? Otherwise I'll create one.


Reply to this email directly or view it on GitHub.

Contributor

justinbmeyer commented Feb 19, 2015

There's a test page for steal's integration.

Sent from my iPhone

On Feb 19, 2015, at 7:46 AM, Matthew Phillips notifications@github.com wrote:

Interesting, is there an existing demo page or something to test with? Otherwise I'll create one.


Reply to this email directly or view it on GitHub.

@matthewp

This comment has been minimized.

Show comment
Hide comment
@matthewp

matthewp Feb 19, 2015

Contributor

One issue is that we are importing can/view/stache/stache which for amd it should just be can/view/stache. This is only true of amd so I think we can just denormalize it in this one place.

Contributor

matthewp commented Feb 19, 2015

One issue is that we are importing can/view/stache/stache which for amd it should just be can/view/stache. This is only true of amd so I think we can just denormalize it in this one place.

@matthewp

This comment has been minimized.

Show comment
Hide comment
@matthewp

matthewp Feb 19, 2015

Contributor

I really don't like doing an amd check in autorender but can't think of a better way.

Contributor

matthewp commented Feb 19, 2015

I really don't like doing an amd check in autorender but can't think of a better way.

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Feb 19, 2015

Contributor

Yeah, this will be gone in 3.0

Sent from my iPhone

On Feb 19, 2015, at 9:01 AM, Matthew Phillips notifications@github.com wrote:

I really don't like doing an amd check in autorender but can't think of a better way.


Reply to this email directly or view it on GitHub.

Contributor

justinbmeyer commented Feb 19, 2015

Yeah, this will be gone in 3.0

Sent from my iPhone

On Feb 19, 2015, at 9:01 AM, Matthew Phillips notifications@github.com wrote:

I really don't like doing an amd check in autorender but can't think of a better way.


Reply to this email directly or view it on GitHub.

matthewp added a commit to matthewp/canjs that referenced this issue Feb 19, 2015

can.import works with RequireJS
This Fixes can.import to work with RequireJS. 2 things needed:

1. can.import checks for define && define.amd instead of window.require
(window.require.amd doesn't exist).

2. can.autorender has to pass in the correct moduleName for AMD.

Fixes #1456
@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Feb 19, 2015

Contributor

Closed via #1460

Contributor

daffl commented Feb 19, 2015

Closed via #1460

@daffl daffl closed this Feb 19, 2015

@daffl daffl removed the fixed in branch label Feb 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment