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

Package-scoped variables, new instruction api.pckgscope(), consequent update of the coffeescript package #4907

Closed
wants to merge 3 commits into from

Conversation

TC827
Copy link

@TC827 TC827 commented Aug 7, 2015

At this moment it is not possible to write a meteor package in coffeescript and strict mode. See this stackoverflow question.

This pull request contains the following changes:

  • new instruction api.pckgscope() to be used in package.js to declare variables with package
    scope. This instruction is similar to api.export() with the difference that in this context there is no
    export.
  • the consequent updates to the isobuild
  • the consequent updates to the coffeescript package. The entire problem with share is now
    obsolete
  • update to the documentation of the coffeescript package.
  • small update of the packaging documentation

@apollo-cla
Copy link

@TC827: Before we can merge your pull request, you'll need to sign the Meteor Contributor Agreement: https://contribute.meteor.com/

@TC827
Copy link
Author

TC827 commented Aug 8, 2015

Test cases: github:TC827/meteor_pr4907

@avital
Copy link
Contributor

avital commented Aug 25, 2015

I think there's a much simpler fix to your issue by modifying packages/coffeescript/plugin/compile-coffeescript.js to place the declaration of __coffeescriptShare before "use strict" (which is already searched for).

In the longer term, we're planning to move towards ES6 modules for variable scoping instead of our in-house "linker" solution.

@stubailo
Copy link
Contributor

Yeah, I don't think we are going to add this API to package.js, especially since Avi's fix above should work. I'd look at a PR with that strategy.

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

Successfully merging this pull request may close these issues.

None yet

5 participants