-
Notifications
You must be signed in to change notification settings - Fork 142
Adds es modules support and tests #126
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
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
46729a9
Nested module proposal using wrapper module
weswigham fec2197
Adds CI to verify
orta 0ff4aef
Tests docs
orta ad71efd
Adds tests for rollup and webpack - e.g. the 'module' and 'sideEffect…
orta 3160d50
Adds snowpack to the tests
orta d819465
Update modules/index.js
cf03cbb
Update test/esm-node-native/package.json
c7980ae
Fix CI
orta 965b93e
Update test/cjs/package.json
1007d3e
Address feedback, and adds more tests
orta 964103a
Merge branch 'esm_tests' of https://github.com/microsoft/tslib into e…
orta 2ee4347
Ensure all the test use the fail method
orta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adds tests for rollup and webpack - e.g. the 'module' and 'sideEffect…
…s' options in the package.json
- Loading branch information
commit ad71efd2aa8370358c11a27725b5d629adcfdf6b
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| package-lock.json | ||
| rollup-modules/output | ||
| webpack-modules/dist | ||
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| { | ||
| "dependencies": { | ||
| "tslib": "file:.." | ||
| "tslib": "file:..", | ||
| "rollup": "2.28.2", | ||
| "@rollup/plugin-node-resolve": "9.0.0", | ||
| "webpack": "4.44.2", | ||
| "webpack-cli": "3.3.12" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { __awaiter } from "tslib"; | ||
|
|
||
| export const testFunction = (textToPrint) => __awaiter(void 0, void 0, void 0, function* () { | ||
| console.log(`State: ${textToPrint}`); | ||
| }); | ||
|
|
||
| testFunction("Works") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "scripts": { | ||
| "test": "../node_modules/.bin/rollup -c rollup.config.js && node output/index.js" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
|
|
||
| export default { | ||
| input: 'index.js', | ||
| output: { | ||
| dir: 'output', | ||
orta marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| format: 'cjs' | ||
| }, | ||
| plugins: [nodeResolve()] | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { __awaiter } from "tslib"; | ||
|
|
||
| export const testFunction = (textToPrint) => __awaiter(void 0, void 0, void 0, function* () { | ||
| console.log(`State: ${textToPrint}`); | ||
| }); | ||
|
|
||
| testFunction("Works") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "scripts": { | ||
| "test": "../node_modules/.bin/webpack && node dist/main.js" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| module.exports = { | ||
| mode: "production", | ||
| entry: "./index" | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.