Skip to content

Commit

Permalink
added new empty library caram-pecher-collab
Browse files Browse the repository at this point in the history
  • Loading branch information
helllth committed Sep 30, 2024
1 parent 89874df commit c00e146
Show file tree
Hide file tree
Showing 11 changed files with 212 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libraries/collaboration/carma-pecher-collab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# carma-pecher-collab

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

## Building

Run `nx build carma-pecher-collab` to build the library.

## Running unit tests

Run `nx test carma-pecher-collab` to execute the unit tests via [Vitest](https://vitest.dev/).
32 changes: 32 additions & 0 deletions libraries/collaboration/carma-pecher-collab/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const { FlatCompat } = require("@eslint/eslintrc");
const baseConfig = require("../../../eslint.config.cjs");
const js = require("@eslint/js");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});

module.exports = [
...baseConfig,
{
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
rules: {},
},
{
files: ["**/*.ts", "**/*.tsx"],
rules: {},
},
{
files: ["**/*.js", "**/*.jsx"],
rules: {},
},
...compat.config({ parser: "jsonc-eslint-parser" }).map((config) => ({
...config,
files: ["**/*.json"],
rules: {
...config.rules,
"@nx/dependency-checks": "error",
},
})),
];
9 changes: 9 additions & 0 deletions libraries/collaboration/carma-pecher-collab/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "@carma/carma-pecher-collab",
"version": "0.0.1",
"dependencies": {},
"main": "./index.js",
"module": "./index.mjs",
"typings": "./index.d.ts",
"private": true
}
35 changes: 35 additions & 0 deletions libraries/collaboration/carma-pecher-collab/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "carma-pecher-collab",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libraries/collaboration/carma-pecher-collab/src",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "@nx/vite:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/libraries/collaboration/carma-pecher-collab"
},
"configurations": {
"development": {
"mode": "development"
},
"production": {
"mode": "production"
}
}
},
"test": {
"executor": "@nx/vite:test",
"outputs": ["{options.reportsDirectory}"],
"options": {
"reportsDirectory": "../../../coverage/libraries/collaboration/carma-pecher-collab"
}
},
"lint": {
"executor": "@nx/eslint:lint"
}
}
}
1 change: 1 addition & 0 deletions libraries/collaboration/carma-pecher-collab/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./lib/carma-pecher-collab";
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { carmaPecherCollab } from "./carma-pecher-collab";

describe("carmaPecherCollab", () => {
it("should work", () => {
expect(carmaPecherCollab()).toEqual("carma-pecher-collab");
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function carmaPecherCollab(): string {
return "carma-pecher-collab";
}
22 changes: 22 additions & 0 deletions libraries/collaboration/carma-pecher-collab/tsconfig.json
Original file line number Diff line number Diff line change
@@ -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 changes: 10 additions & 0 deletions libraries/collaboration/carma-pecher-collab/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": ["node", "vite/client"]
},
"include": ["src/**/*.ts"],
"exclude": ["vite.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
}
20 changes: 20 additions & 0 deletions libraries/collaboration/carma-pecher-collab/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",
"types": ["vitest/globals", "vitest/importMeta", "vite/client", "node", "vitest"]
},
"include": [
"vite.config.ts",
"vitest.config.ts",
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/**/*.test.tsx",
"src/**/*.spec.tsx",
"src/**/*.test.js",
"src/**/*.spec.js",
"src/**/*.test.jsx",
"src/**/*.spec.jsx",
"src/**/*.d.ts"
]
}
62 changes: 62 additions & 0 deletions libraries/collaboration/carma-pecher-collab/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/// <reference types='vitest' />
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
import * as path from "path";
import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";

export default defineConfig({
root: __dirname,
cacheDir:
"../../../node_modules/.vite/libraries/collaboration/carma-pecher-collab",

plugins: [
nxViteTsPaths(),
dts({
entryRoot: "src",
tsconfigPath: path.join(__dirname, "tsconfig.lib.json"),
}),
],

// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
// },

// Configuration for building your library.
// See: https://vitejs.dev/guide/build.html#library-mode
build: {
outDir: "../../../dist/libraries/collaboration/carma-pecher-collab",
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
},
lib: {
// Could also be a dictionary or array of multiple entry points.
entry: "src/index.ts",
name: "carma-pecher-collab",
fileName: "index",
// Change this to the formats you want to support.
// Don't forget to update your package.json as well.
formats: ["es", "cjs"],
},
rollupOptions: {
// External packages that should not be bundled into your library.
external: [],
},
},

test: {
watch: false,
globals: true,
environment: "node",
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],

reporters: ["default"],
coverage: {
reportsDirectory:
"../../../coverage/libraries/collaboration/carma-pecher-collab",
provider: "v8",
},
},
});

0 comments on commit c00e146

Please sign in to comment.