Create Libraries and basic tooltip
This commit is contained in:
25
libs/container/.eslintrc.json
Normal file
25
libs/container/.eslintrc.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.json"],
|
||||
"parser": "jsonc-eslint-parser",
|
||||
"rules": {
|
||||
"@nx/dependency-checks": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
13
libs/container/README.md
Normal file
13
libs/container/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# container
|
||||
|
||||
> !note: this needs to be imported from stackblitz
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build container` to build the library.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `nx test container` to execute the unit tests via [Jest](https://jestjs.io).
|
||||
11
libs/container/jest.config.ts
Normal file
11
libs/container/jest.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
displayName: 'container',
|
||||
preset: '../../jest.preset.js',
|
||||
testEnvironment: 'node',
|
||||
transform: {
|
||||
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/libs/container',
|
||||
};
|
||||
10
libs/container/package.json
Normal file
10
libs/container/package.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "@z-elements/container",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
"type": "commonjs",
|
||||
"main": "./src/index.js",
|
||||
"typings": "./src/index.d.ts"
|
||||
}
|
||||
43
libs/container/project.json
Normal file
43
libs/container/project.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "container",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/container/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "dist/libs/container",
|
||||
"main": "libs/container/src/index.ts",
|
||||
"tsConfig": "libs/container/tsconfig.lib.json",
|
||||
"assets": ["libs/container/*.md"]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/linter:eslint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"libs/container/**/*.ts",
|
||||
"libs/container/package.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
||||
"options": {
|
||||
"jestConfig": "libs/container/jest.config.ts",
|
||||
"passWithNoTests": true
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"ci": true,
|
||||
"codeCoverage": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
1
libs/container/src/index.ts
Normal file
1
libs/container/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './lib/container';
|
||||
7
libs/container/src/lib/container.spec.ts
Normal file
7
libs/container/src/lib/container.spec.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { container } from './container';
|
||||
|
||||
describe('container', () => {
|
||||
it('should work', () => {
|
||||
expect(container()).toEqual('container');
|
||||
});
|
||||
});
|
||||
3
libs/container/src/lib/container.ts
Normal file
3
libs/container/src/lib/container.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export function container(): string {
|
||||
return 'container';
|
||||
}
|
||||
22
libs/container/tsconfig.json
Normal file
22
libs/container/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
10
libs/container/tsconfig.lib.json
Normal file
10
libs/container/tsconfig.lib.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
|
||||
}
|
||||
14
libs/container/tsconfig.spec.json
Normal file
14
libs/container/tsconfig.spec.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"types": ["jest", "node"]
|
||||
},
|
||||
"include": [
|
||||
"jest.config.ts",
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user