Skip to content

Commit

Permalink
feat: introducing foo
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent committed Aug 24, 2022
1 parent 4324757 commit d946ab3
Show file tree
Hide file tree
Showing 15 changed files with 151 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"packages/greet":"1.1.0","packages/shout":"0.1.0","packages/sparkle":"0.1.0","packages/demo":"1.0.0","packages/pidgin":"1.0.0"}
{"packages/greet":"1.1.0","packages/shout":"0.1.0","packages/sparkle":"0.1.0","packages/demo":"1.0.0", "packages/foo":"0.0.1","packages/pidgin":"1.0.0"}
18 changes: 18 additions & 0 deletions packages/foo/.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 packages/foo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# foo

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

## Building

Run `nx build foo` to build the library.

## Running unit tests

Run `nx test foo` to execute the unit tests via [Jest](https://jestjs.io).
15 changes: 15 additions & 0 deletions packages/foo/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-disable */
export default {
displayName: 'foo',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
transform: {
'^.+\\.[tj]s$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/packages/foo',
};
5 changes: 5 additions & 0 deletions packages/foo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "@zeflo/foo",
"version": "0.0.1",
"type": "commonjs"
}
45 changes: 45 additions & 0 deletions packages/foo/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/foo/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/foo",
"main": "packages/foo/src/index.ts",
"tsConfig": "packages/foo/tsconfig.lib.json",
"assets": ["packages/foo/*.md"]
}
},
"publish": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"command": "node tools/scripts/publish.mjs foo {args.ver} {args.tag}"
},
"dependsOn": [
{
"projects": "self",
"target": "build"
}
]
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/foo/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/foo"],
"options": {
"jestConfig": "packages/foo/jest.config.ts",
"passWithNoTests": true
}
}
},
"tags": []
}
1 change: 1 addition & 0 deletions packages/foo/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/foo';
7 changes: 7 additions & 0 deletions packages/foo/src/lib/foo.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { foo } from './foo';

describe('foo', () => {
it('should work', () => {
expect(foo()).toEqual('foo');
});
});
3 changes: 3 additions & 0 deletions packages/foo/src/lib/foo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function foo(): string {
return 'foo';
}
22 changes: 22 additions & 0 deletions packages/foo/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 packages/foo/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", "**/*.test.ts"]
}
9 changes: 9 additions & 0 deletions packages/foo/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
}
3 changes: 2 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"packages/pidgin": {
"component": "Pidgin"
},
"packages/demo": {}
"packages/demo": {},
"packages/foo": {}
}
}
1 change: 1 addition & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"baseUrl": ".",
"paths": {
"@zeflo/demo": ["packages/demo/src/index.ts"],
"@zeflo/foo": ["packages/foo/src/index.ts"],
"@zeflo/greet": ["packages/greet/src/index.ts"],
"@zeflo/pidgin": ["packages/pidgin/src/index.ts"],
"@zeflo/shout": ["packages/shout/src/index.ts"],
Expand Down
1 change: 1 addition & 0 deletions workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": 2,
"projects": {
"demo": "packages/demo",
"foo": "packages/foo",
"greet": "packages/greet",
"pidgin": "packages/pidgin",
"shout": "packages/shout",
Expand Down

0 comments on commit d946ab3

Please sign in to comment.