Skip to content

Commit

Permalink
added state & material lib
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorromerodev committed Sep 6, 2022
1 parent 7509944 commit fad68b6
Show file tree
Hide file tree
Showing 23 changed files with 263 additions and 1 deletion.
3 changes: 3 additions & 0 deletions libs/core-state/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
}
18 changes: 18 additions & 0 deletions libs/core-state/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
11 changes: 11 additions & 0 deletions libs/core-state/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# core-state

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test core-state` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint core-state` to execute the lint via [ESLint](https://eslint.org/).
15 changes: 15 additions & 0 deletions libs/core-state/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-disable */
export default {
displayName: 'core-state',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/libs/core-state',
};
23 changes: 23 additions & 0 deletions libs/core-state/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/core-state/src",
"projectType": "library",
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/core-state/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/core-state"],
"options": {
"jestConfig": "libs/core-state/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": []
}
1 change: 1 addition & 0 deletions libs/core-state/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/core-state';
7 changes: 7 additions & 0 deletions libs/core-state/src/lib/core-state.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { coreState } from './core-state';

describe('coreState', () => {
it('should work', () => {
expect(coreState()).toEqual('core-state');
});
});
3 changes: 3 additions & 0 deletions libs/core-state/src/lib/core-state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function coreState(): string {
return 'core-state';
}
19 changes: 19 additions & 0 deletions libs/core-state/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
],
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
}
}
10 changes: 10 additions & 0 deletions libs/core-state/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": []
},
"include": ["**/*.ts"],
"exclude": ["jest.config.ts", "**/*.spec.ts"]
}
20 changes: 20 additions & 0 deletions libs/core-state/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": [
"jest.config.ts",
"**/*.test.ts",
"**/*.spec.ts",
"**/*.test.tsx",
"**/*.spec.tsx",
"**/*.test.js",
"**/*.spec.js",
"**/*.test.jsx",
"**/*.spec.jsx",
"**/*.d.ts"
]
}
3 changes: 3 additions & 0 deletions libs/material/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
}
18 changes: 18 additions & 0 deletions libs/material/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
11 changes: 11 additions & 0 deletions libs/material/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# material

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test material` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint material` to execute the lint via [ESLint](https://eslint.org/).
15 changes: 15 additions & 0 deletions libs/material/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-disable */
export default {
displayName: 'material',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/libs/material',
};
23 changes: 23 additions & 0 deletions libs/material/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/material/src",
"projectType": "library",
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/material/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/material"],
"options": {
"jestConfig": "libs/material/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": []
}
1 change: 1 addition & 0 deletions libs/material/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/material';
7 changes: 7 additions & 0 deletions libs/material/src/lib/material.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { material } from './material';

describe('material', () => {
it('should work', () => {
expect(material()).toEqual('material');
});
});
3 changes: 3 additions & 0 deletions libs/material/src/lib/material.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function material(): string {
return 'material';
}
19 changes: 19 additions & 0 deletions libs/material/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
],
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
}
}
10 changes: 10 additions & 0 deletions libs/material/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": []
},
"include": ["**/*.ts"],
"exclude": ["jest.config.ts", "**/*.spec.ts"]
}
20 changes: 20 additions & 0 deletions libs/material/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": [
"jest.config.ts",
"**/*.test.ts",
"**/*.spec.ts",
"**/*.test.tsx",
"**/*.spec.tsx",
"**/*.test.js",
"**/*.spec.js",
"**/*.test.jsx",
"**/*.spec.jsx",
"**/*.d.ts"
]
}
4 changes: 3 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"baseUrl": ".",
"paths": {
"@hr-webdev/api-interfaces": ["libs/api-interfaces/src/index.ts"],
"@hr-webdev/core-data": ["libs/core-data/src/index.ts"]
"@hr-webdev/core-data": ["libs/core-data/src/index.ts"],
"@hr-webdev/core-state": ["libs/core-state/src/index.ts"],
"@hr-webdev/material": ["libs/material/src/index.ts"]
}
},
"exclude": ["node_modules", "tmp"]
Expand Down

0 comments on commit fad68b6

Please sign in to comment.