Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add systemjs guide #464

Merged
merged 1 commit into from
Jul 8, 2016
Merged

docs: add systemjs guide #464

merged 1 commit into from
Jul 8, 2016

Conversation

tamird
Copy link
Contributor

@tamird tamird commented Jun 21, 2016

Related to #302, jspm/jspm-cli#1875.

"overrides": {
"npm:enzyme@2.3.0": {
"map": {
"cheerio": "@empty",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not super sure about this line. Perhaps @guybedford knows the correct mapping to Webpack's 'window'?

@aweary
Copy link
Collaborator

aweary commented Jun 21, 2016

As far as I know, SystemJS and jspm are distinct projects, with jspm being implemented on top of SystemJS. I don't think we should be including instructions for SystemJS, webpack, and jspm in one doc.

@aweary aweary added the docs label Jun 21, 2016
@tamird
Copy link
Contributor Author

tamird commented Jun 21, 2016

SystemJS and JSPM are tightly coupled, but one is not built on the other (jspm is the package manager, systemjs is the loader).

The reason to put these instructions in the same doc is that they are largely the same, and the reason for the workaround is also the same. What's the upshot to splitting them up? Updates to one are likely to require updating the other.

@aweary
Copy link
Collaborator

aweary commented Jun 21, 2016

SystemJS and jspm may be coupled, but why are we including it in the webpack documentation? If anything jspm specific instructions should be in a separate doc.

What's the upshot to splitting them up? Updates to one are likely to require updating the other.

jspm is not a requirement for using webpack and I've honestly seen very few people using jspm + webpack + React. You may be able to pair the two, but our webpack docs shouldn't assume this. If we want to add docs for jspm we can mention webpack + jspm integration there.

@tamird
Copy link
Contributor Author

tamird commented Jun 21, 2016

Note that I've renamed the file, so it's not "the webpack documentation".

@aweary
Copy link
Collaborator

aweary commented Jun 21, 2016

Note that I've renamed the file, so it's not "the webpack documentation".

We have individual doc pages for other bundlers or build systems, we should keep that same setup. my point is that I don't want to lump together webpack and jspm.

@tamird
Copy link
Contributor Author

tamird commented Jun 21, 2016

Oh, I didn't realize e.g. browserify was separate. Updated.

@tamird tamird changed the title docs: update Webpack instructions to include SystemJS docs: add systemjs guide Jun 21, 2016
@tamird
Copy link
Contributor Author

tamird commented Jun 23, 2016

@aweary ping

@aweary
Copy link
Collaborator

aweary commented Jun 23, 2016

I don't know enough about SystemJS to know if this is accurate, unfortunately

@ljharb @lelandrichardson does this look OK to you?

@tamird
Copy link
Contributor Author

tamird commented Jun 23, 2016

We're using this configuration in CockroachDB: https://github.com/cockroachdb/cockroach/blob/master/ui/package.json#L51:L58

@aweary
Copy link
Collaborator

aweary commented Jun 23, 2016

We're using this configuration in CockroachDB: https://github.com/cockroachdb/cockroach/blob/master/ui/package.json#L51:L58

👍 I just want one other contributor to take a look at it before we make any changes to our docs.

}
}
}
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than documenting this for all users to do manually, it may just be better to check this override in to the jspm registry or package.json file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the override depends on the react version in use.

@guybedford
Copy link

Thanks @tamird for paving a path here. Are we really ok excluding these dependencies entirely in jspm, or should they be conditionally loaded based on certain conditions?

If we can be sure of the configuration, then we can check it into the jspm registry (https://github.com/jspm/registry), or even better the package.json of this project itself, although either is fine.

Just let me know if I can help further at all to review.

@tamird
Copy link
Contributor Author

tamird commented Jun 24, 2016

they're conditional on the version of another dependency - is there a way to express that?

@edrex
Copy link

edrex commented Jun 24, 2016

The override provided for react 0.15.x isn't working for me (using karma-jspm)

Nevermind, after running jspm update it is working for me.

@guybedford
Copy link

@tamird yes we can do a conditional map configs, but it may be a little complex for this use case, so worth encouraging the manual process at least for now.

edrex added a commit to edrex/autocomplete that referenced this pull request Jun 25, 2016
@aweary
Copy link
Collaborator

aweary commented Jun 25, 2016

@guybedford thanks for jumping in here, I'll defer to your judgement whether these docs look good for jspm/SystemJS. If there's anything enzyme specific you're not sure of I'm happy to help, but otherwise if this looks good I'm sure we can get this merged.

following files are labeled as "external", which means they will be ignored:

```
react/addons
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since down below you specify the externals for react 0.14 and 15 specifically it's unclear for which version of react this list up here is meant for

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this could be better. It's copied from the other guides, so I think that any improvement here should be bundled with improvements to the other guides.

@nfcampos
Copy link
Collaborator

@aweary I've taken a look and it looks alright to me (other than the 2 comments I left), however, i've no experience with systemjs so I can't be much help there

@guybedford
Copy link

@aweary I'm not that familiar with the exact mechanics for these configs, but it seems like the right sort of approach to me here although it would definitely be worth looking at automating this configuration in future. Thanks so much for being open to including instructions for this, and I'll aim to keep an eye on this use case as well.

@aweary
Copy link
Collaborator

aweary commented Jul 5, 2016

@tamird if you can address @nfcampos's comment(s) and if @guybedford thinks this looks acceptable I think we can merge this after you merge the latest changes from master.

@tamird
Copy link
Contributor Author

tamird commented Jul 5, 2016

@aweary done.

@lelandrichardson
Copy link
Collaborator

This LGTM.

@tamird one last thing: You should add this file to : https://github.com/airbnb/enzyme/blob/master/docs/README.md so that it shows up in the docs site!

@tamird
Copy link
Contributor Author

tamird commented Jul 8, 2016

Done.

On Fri, Jul 8, 2016 at 12:22 AM, Leland Richardson <notifications@github.com

wrote:

This LGTM.

@tamird https://github.com/tamird one last thing: You should add this
file to : https://github.com/airbnb/enzyme/blob/master/docs/README.md so
that it shows up in the docs site!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#464 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABdsPHn5uUTTNtAAPvqqSd90EWsdsYQZks5qTdB8gaJpZM4I6PsS
.

@aweary aweary merged commit 5223698 into enzymejs:master Jul 8, 2016
@aweary
Copy link
Collaborator

aweary commented Jul 8, 2016

Thanks @tamird 🎉

@tamird tamird deleted the jspm-webpack branch July 8, 2016 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants