forked from bazel-contrib/rules_nodejs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add browser module main priority to generated umd bundles
* use babelfiy transform esm->cjs in npm_umd_bundle
- Loading branch information
Showing
87 changed files
with
160,378 additions
and
20,389 deletions.
There are no files selected for viewing
This file contains 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 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,13 +1,9 @@ | ||
.idea | ||
rules_nodejs-*.tar.gz | ||
dist | ||
release | ||
bazel-out | ||
/e2e/*/bazel-* | ||
/examples/*/bazel-* | ||
/packages/*/bazel-* | ||
node_modules | ||
examples/vendored_node/node-v10.12.0-linux-x64 | ||
examples/vendored_node/node-v10.12.0-linux-x64.tar.xz | ||
examples/vendored_node/yarn-v1.10.0 | ||
examples/vendored_node/yarn-v1.10.0.tar.gz | ||
!/third_party/npm/node_modules |
This file contains 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 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 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,7 +1,44 @@ | ||
import {format} from 'date-fns'; | ||
import {of} from 'rxjs'; | ||
import {Column, Entity, PrimaryGeneratedColumn} from 'typeorm'; | ||
|
||
const el: HTMLDivElement = document.createElement('div'); | ||
const date: string = format(new Date(2019, 4, 7), 'MMMM D, YYYY'); | ||
el.innerText = `Hello, TypeScript today is ${date}`; | ||
el.className = 'ts1'; | ||
document.body.appendChild(el); | ||
function appendText(text: string, className: string) { | ||
const el: HTMLDivElement = document.createElement('div'); | ||
el.innerText = text; | ||
el.className = className; | ||
document.body.appendChild(el); | ||
} | ||
|
||
function testDateFns() { | ||
const date: string = format(new Date(2019, 4, 7), 'MMMM D, YYYY'); | ||
appendText(`Hello, TypeScript today is ${date}`, 'ts1'); | ||
} | ||
|
||
|
||
@Entity() | ||
export class User { | ||
@PrimaryGeneratedColumn() | ||
id: number; | ||
@Column() | ||
firstName: string; | ||
@Column() | ||
lastName: string; | ||
@Column() | ||
isActive: boolean; | ||
} | ||
|
||
function testBrowserEntryPoint() { | ||
// this script will throw if the browser entryPoint in typeorm wasn't resolved correctly | ||
const user = new User(); | ||
user.firstName = 'foo'; | ||
appendText(`firstname: ${user.firstName}`, 'entrypoint-browser'); | ||
} | ||
|
||
function testModuleEntryPoint() { | ||
// rxjs uses the module entrypoint to resolve to some import/export | ||
of('rxjs works with modules!').subscribe(value => appendText(String(value), 'entrypoint-module')) | ||
} | ||
|
||
testDateFns(); | ||
testBrowserEntryPoint(); | ||
testModuleEntryPoint(); |
This file contains 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 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 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,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"experimentalDecorators": true, | ||
"lib": ["es2015", "dom"] | ||
} | ||
} |
Oops, something went wrong.