Skip to content

Commit

Permalink
feat: basic job search plugin structure
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-rocket committed May 3, 2024
1 parent 725d9aa commit 6e82fc0
Show file tree
Hide file tree
Showing 17 changed files with 294 additions and 18 deletions.
2 changes: 1 addition & 1 deletion apps/gauzy-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"cypress-file-upload": "^5.0.8",
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^6.0.0",
"jest": "29.4.3",
"jest": "^29.7.0",
"jest-preset-angular": "^13.1.4",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
Expand Down
3 changes: 2 additions & 1 deletion apps/gauzy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"@fullcalendar/timegrid": "~6.1.10",
"@gauzy/common-angular": "^0.1.0",
"@gauzy/contracts": "^0.1.0",
"@gauzy/job-search-ui-plugin": "^0.0.1",
"@jitsu/js": "^1.8.2",
"@kurkle/color": "^0.2.0",
"@nebular/auth": "^12.0.0",
Expand Down Expand Up @@ -198,7 +199,7 @@
"copy-webpack-plugin": "^9.0.1",
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^6.0.0",
"jest": "29.4.3",
"jest": "^29.7.0",
"jest-preset-angular": "^13.1.4",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@
"build:package:plugin:product-reviews:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/product-reviews build",
"build:package:plugin:job-search": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-search build",
"build:package:plugin:job-search:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-search build",
"build:package:plugin:job-search-ui": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-search-ui build",
"build:package:plugin:job-search-ui:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-search-ui build:prod",
"build:package:plugin:job-proposal": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-proposal build",
"build:package:plugin:job-proposal:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/job-proposal build",
"build:package:plugin:knowledge-base": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/knowledge-base build",
Expand Down Expand Up @@ -366,7 +368,7 @@
"fork-ts-checker-webpack-plugin": "^5.2.0",
"gulp-tag-version": "^1.3.1",
"husky": "^6.0.0",
"jest": "29.7.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-jasmine2": "29.4.3",
"jest-preset-angular": "13.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
"@types/web-push": "^3.3.0",
"@types/yargs": "^15.0.9",
"copyfiles": "^2.4.1",
"jest": "29.4.3",
"jest": "^29.7.0",
"nodemon": "^3.1.0",
"rimraf": "^3.0.2",
"supertest": "^6.0.1",
Expand Down
44 changes: 44 additions & 0 deletions packages/plugins/job-search-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
dist/*
build
*.ngfactory.ts
*.ngsummary.json

# Coverage
coverage/*

# Node
node_modules/*
src/node_modules

npm-debug.log

# TypeScript
*.js
*.map
*.d.ts

# JetBrains
.idea
.project
.settings
.idea/*
*.iml

# VS Code
.vscode/*

# Windows
Thumbs.db
Desktop.ini

# Mac
.DS_Store
**/.DS_Store

src/*.js
src/*.map
src/*.d.ts
src/*.ngfactory.ts

# misc
/.angular/cache
13 changes: 13 additions & 0 deletions packages/plugins/job-search-ui/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.npmignore
.travis.yml
CHANGELOG.md
demo
test
coverage
typings
typings.json
tsd.json
lib/*.spec.*
src/node_modules
debug.log
config/**
25 changes: 25 additions & 0 deletions packages/plugins/job-search-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# JobSearchUiPLugin

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.12.

## Code scaffolding

Run `ng generate component component-name --project job-search-ui-plugin` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project job-search-ui-plugin`.

> Note: Don't forget to add `--project job-search-ui-plugin` or else it will be added to the default project in your `angular.json` file.
## Build

Run `ng build job-search-ui-plugin` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build`, go to the dist folder `cd dist/job-search-ui` and run `npm publish`.

## Running unit tests

Run `ng test job-search-ui-plugin` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
52 changes: 52 additions & 0 deletions packages/plugins/job-search-ui/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "",
"projects": {
"job-search-ui": {
"projectType": "library",
"root": ".",
"sourceRoot": "./src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "./tsconfig.lib.json",
"project": "./ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "./tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "./src/test.ts",
"tsConfig": "./tsconfig.spec.json",
"karmaConfig": "./karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"./tsconfig.lib.json",
"./tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
},
"schematics": {
"@nrwl/workspace:component": {
"style": "scss"
}
}
}
}
}
7 changes: 7 additions & 0 deletions packages/plugins/job-search-ui/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "./dist/job-search-ui",
"lib": {
"entryFile": "./src/public-api.ts"
}
}
54 changes: 54 additions & 0 deletions packages/plugins/job-search-ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "@gauzy/job-search-ui-plugin",
"version": "0.0.1",
"description": "UI plugin for job search in Gauzy",
"author": {
"name": "Ever Co. LTD",
"email": "ever@ever.co",
"url": "https://ever.co"
},
"license": "AGPL-3.0",
"private": true,
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build job-search-ui",
"build:prod": "ng build job-search-ui --configuration production",
"test": "ng test",
"lint": "ng lint"
},
"keywords": [
"angular",
"plugin",
"ui",
"job-search"
],
"dependencies": {
"tslib": "^2.3.0"
},
"devDependencies": {
"@angular/cli": "^16.2.11",
"@types/jest": "^29.4.4",
"jasmine-core": "^5.1.2",
"jest": "^29.7.0",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.7.0"
},
"peerDependencies": {
"@angular/common": "^16.2.12",
"@angular/core": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"zone.js": "^0.14.2"
},
"repository": {
"type": "git",
"url": "https://github.com/ever-co/ever-gauzy"
},
"bugs": {
"url": "https://github.com/ever-co/ever-gauzy/issues"
},
"sideEffects": false
}
22 changes: 22 additions & 0 deletions packages/plugins/job-search-ui/src/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
13 changes: 13 additions & 0 deletions packages/plugins/job-search-ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"typeRoots": [
"node_modules/@types"
],
"types": ["node", "jest"],
"paths": {
"@gauzy/job-search-ui-plugin": ["./dist/job-search-ui"]
}
}
}
13 changes: 13 additions & 0 deletions packages/plugins/job-search-ui/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": []
},
"exclude": [
"**/*.spec.ts"
]
}
9 changes: 9 additions & 0 deletions packages/plugins/job-search-ui/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"compilationMode": "partial"
}
}
17 changes: 17 additions & 0 deletions packages/plugins/job-search-ui/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"@nebular/*": ["./node_modules/@nebular/*"],
"ng2-completer": ["node_modules/@akveo/ng2-completer"],
"ngx-daterangepicker-material/*": ["./node_modules/ngx-daterangepicker-material/*"],
"swiper_angular": ["./node_modules/swiper/angular"]
"swiper_angular": ["./node_modules/swiper/angular"],
"@gauzy/job-search-ui-plugin": ["./node_modules/@gauzy/job-search-ui-plugin/dist/job-search-ui"]
},
"preserveConstEnums": true,
"allowSyntheticDefaultImports": true,
Expand Down

0 comments on commit 6e82fc0

Please sign in to comment.