-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(component): initial setup #2257
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
load("//tools:defaults.bzl", "ng_module", "ng_package") | ||
|
||
ng_module( | ||
name = "component", | ||
srcs = glob([ | ||
"*.ts", | ||
"src/**/*.ts", | ||
]), | ||
module_name = "@ngrx/component", | ||
deps = [ | ||
# TODO: @ngrx/component - add ngrx deps, also add it to package.json as peerDependency | ||
# "//modules/store", | ||
"@npm//@angular/common", | ||
"@npm//@angular/core", | ||
"@npm//rxjs", | ||
], | ||
) | ||
|
||
ng_package( | ||
name = "npm_package", | ||
srcs = glob(["**/*.externs.js"]) + [ | ||
"package.json", | ||
], | ||
entry_point = "modules/component/index.js", | ||
packages = [ | ||
# TODO: @ngrx/component - add schematic | ||
# "//modules/component/schematics-core:npm_package", | ||
], | ||
deps = [ | ||
":component", | ||
], | ||
) |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Change Log | ||
|
||
See [CHANGELOG.md](https://github.com/ngrx/platform/blob/master/CHANGELOG.md) |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# @ngrx/component | ||
|
||
The sources for this package are in the main [NgRx](https://github.com/ngrx/platform) repo. Please file issues and pull requests against that repo. | ||
|
||
License: MIT |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* DO NOT EDIT | ||
* | ||
* This file is automatically generated at build | ||
*/ | ||
|
||
export * from './public_api'; |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "@ngrx/component", | ||
"version": "0.0.0-PLACEHOLDER", | ||
"description": "Reactive utilities for components", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ngrx/platform.git" | ||
}, | ||
"keywords": [ | ||
"Angular", | ||
"Redux", | ||
"NgRx", | ||
"Schematics", | ||
"Angular CLI" | ||
], | ||
"author": "NgRx", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/ngrx/platform/issues" | ||
}, | ||
"homepage": "https://github.com/ngrx/platform#readme", | ||
"peerDependencies": { | ||
"@angular/common": "NG_VERSION", | ||
"@angular/core": "NG_VERSION", | ||
"rxjs": "RXJS_VERSION" | ||
}, | ||
"sideEffects": false | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './src/index'; |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default { | ||
entry: './dist/component/@ngrx/component.es5.js', | ||
dest: './dist/component/bundles/component.umd.js', | ||
format: 'umd', | ||
exports: 'named', | ||
moduleName: 'ngrx.component', | ||
globals: { | ||
// TODO: @ngrx/component - add ngrx deps, also add it to tsconfig-build.json as path | ||
// '@ngrx/store': 'ngrx.store', | ||
}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
load("//tools:defaults.bzl", "jasmine_node_test", "ts_test_library") | ||
|
||
ts_test_library( | ||
name = "test_lib", | ||
srcs = glob( | ||
[ | ||
"**/*.ts", | ||
], | ||
), | ||
deps = [ | ||
"//modules/component", | ||
# TODO: @ngrx/component - add ngrx deps | ||
# "//modules/store", | ||
"@npm//@angular/common", | ||
"@npm//rxjs", | ||
], | ||
) | ||
|
||
jasmine_node_test( | ||
name = "test", | ||
deps = [ | ||
":test_lib", | ||
"//modules/component", | ||
# TODO: @ngrx/component - add ngrx deps | ||
# "//modules/store", | ||
], | ||
) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// TODO: @ngrx/component - remove this file | ||
|
||
import { sum } from '@ngrx/component'; | ||
|
||
describe('placeholder', () => { | ||
it('should run specs', () => { | ||
expect(sum(2, 5)).toBe(7); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './placeholder'; |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// TODO: @ngrx/component - remove this file | ||
|
||
export function sum(a: number, b: number) { | ||
return a + b; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"declaration": true, | ||
"stripInternal": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"strictPropertyInitialization": false, | ||
"module": "es2015", | ||
"moduleResolution": "node", | ||
"noEmitOnError": false, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"downlevelIteration": true, | ||
"outDir": "../../dist/packages/component", | ||
"paths": {}, | ||
"rootDir": ".", | ||
"sourceMap": true, | ||
"inlineSources": true, | ||
"lib": ["es2015", "dom"], | ||
"target": "es2015", | ||
"skipLibCheck": true | ||
}, | ||
"files": ["public_api.ts"], | ||
"angularCompilerOptions": { | ||
"annotateForClosureCompiler": true, | ||
// Work around for issue: https://github.com/angular/angular/issues/22210 | ||
"strictMetadataEmit": false, | ||
"flatModuleOutFile": "index.js", | ||
"flatModuleId": "@ngrx/component", | ||
"enableIvy": false | ||
} | ||
} |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
component
doesn't have schematics,pkgConfig['ng-update'].migrations
threw an error.