Skip to content

Conversation

colmbrady
Copy link
Contributor

  • Fix code in cjs.js to correctly match last index of comments.
  • Add test module that includes the require('') at end of comment string
  • Add unit test to prove the module can be loaded OK with the comment present

- Fix code in cjs.js to correctly match last index of comments.
- Add test module that includes the require('') at end of comment string
- Add unit test to prove the module can be loaded OK with the comment present
@@ -0,0 +1,15 @@
"format cjs";
Copy link
Member

Choose a reason for hiding this comment

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

This isn't a valid CommonJS file.

Try just writing:

// This comment triggered SystemJS to do a require because of this -> require('')
exports.exportName = 'export';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true, the penny has just dropped that the existing commonjs-requires.js test file gets executed by the loader, so I just moved the test into there as you originally suggested. Thanks.

- Adding unit test to existing commonjs-requires.js file.
- Remove redundant file.
guybedford added a commit that referenced this pull request Nov 18, 2015
@guybedford guybedford merged commit bb41c85 into systemjs:master Nov 18, 2015
@guybedford
Copy link
Member

Excellent, thanks this all seems to work out nicely now.

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

Successfully merging this pull request may close these issues.

2 participants