Skip to content

Commit

Permalink
fix: refactor job search ui library
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-rocket committed May 6, 2024
1 parent 57bd427 commit cc7241e
Show file tree
Hide file tree
Showing 18 changed files with 1,281 additions and 1,282 deletions.
2,203 changes: 1,139 additions & 1,064 deletions angular.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/gauzy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +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",
"job-search-ui-plugin": "file:../../dist/plugins/job-search-ui",
"@jitsu/js": "^1.8.2",
"@kurkle/color": "^0.2.0",
"@nebular/auth": "^12.0.0",
Expand Down
4 changes: 3 additions & 1 deletion apps/gauzy/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import { FeatureService, GoogleMapsLoaderService } from './@core/services';
import { AppInitService } from './@core/services/app-init-service';
import { NbEvaIconsModule } from '@nebular/eva-icons';
import { CookieService } from 'ngx-cookie-service';
import { JobSearchUiModule } from '@job-search-ui-plugin';
import { NgxDaterangepickerMd } from 'ngx-daterangepicker-material';
import { dayOfWeekAsString } from './@theme/components/header/selectors/date-range-picker';
import { GAUZY_ENV } from './@core/constants';
Expand Down Expand Up @@ -109,7 +110,8 @@ if (environment.SENTRY_DSN) {
NgxPermissionsModule.forRoot(),
NgxDaterangepickerMd.forRoot({
firstDay: dayOfWeekAsString(WeekDaysEnum.MONDAY)
})
}),
JobSearchUiModule
],
bootstrap: [AppComponent],
providers: [
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"build:package:plugin": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugin build",
"build:package:plugin:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugin build",
"build:package:plugins:pre": "yarn run build:package:plugin:integration-ai && yarn run build:package:plugin:integration-hubstaff && yarn run build:package:plugin:integration-upwork && yarn run build:package:plugin:integration-github && yarn run build:package:plugin:integration-jira && yarn run build:package:plugin:job-search-ui",
"build:package:plugins:pre:prod": "yarn run build:package:plugin:integration-ai:prod && yarn run build:package:plugin:integration-hubstaff:prod && yarn run build:package:plugin:integration-upwork:prod && yarn run build:package:plugin:integration-github:prod && yarn run build:package:plugin:integration-jira:prod && yarn run build:package:plugin:job-search-ui:prod",
"build:package:plugins:pre:prod": "yarn run build:package:plugin:integration-ai:prod && yarn run build:package:plugin:integration-hubstaff:prod && yarn run build:package:plugin:integration-upwork:prod && yarn run build:package:plugin:integration-github:prod && yarn run build:package:plugin:integration-jira:prod",
"build:package:plugins:post": "yarn run build:package:plugin:sentry && yarn run build:package:plugin:jitsu-analytic && yarn run build:package:plugin:product-reviews && yarn run build:package:plugin:job-search && yarn run build:package:plugin:job-proposal && yarn run build:package:plugin:knowledge-base && yarn run build:package:plugin:changelog",
"build:package:plugins:post:prod": "yarn run build:package:plugin:sentry:prod && yarn run build:package:plugin:jitsu-analytic:prod && yarn run build:package:plugin:product-reviews:prod && yarn run build:package:plugin:job-search:prod && yarn run build:package:plugin:job-proposal:prod && yarn run build:package:plugin:knowledge-base:prod && yarn run build:package:plugin:changelog:prod",
"build:package:plugin:integration-ai": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn --cwd ./packages/plugins/integration-ai build",
Expand All @@ -153,8 +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-search-ui": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 ng build job-search-ui-plugin",
"build:package:plugin:job-search-ui:prod": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 ng build job-search-ui-plugin --configuration production",
"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 @@ -297,6 +297,7 @@
"dotenv": "^16.0.3",
"ffi-napi": "^4.0.3",
"iconv": "^3.0.1",
"job-search-ui-plugin": "file:./dist/plugins/job-search-ui",
"jsdom": "^23.0.1",
"lodash-es": "^4.17.21",
"parse5": "^7.1.2",
Expand Down
9 changes: 4 additions & 5 deletions packages/plugins/job-search-ui/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# JobSearchUiPLugin
# JobSearchUi Plugin

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

## 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.
Run `ng build job-search-ui-plugin` to build the project. The build artifacts will be stored in the `dist/plugins/` directory.

## Publishing

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

## Running unit tests

Expand Down
52 changes: 0 additions & 52 deletions packages/plugins/job-search-ui/angular.json

This file was deleted.

10 changes: 5 additions & 5 deletions packages/plugins/job-search-ui/ng-package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "./dist/job-search-ui",
"lib": {
"entryFile": "./src/public-api.ts"
}
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/plugins/job-search-ui",
"lib": {
"entryFile": "src/public-api.ts"
}
}
31 changes: 5 additions & 26 deletions packages/plugins/job-search-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@gauzy/job-search-ui-plugin",
"name": "job-search-ui-plugin",
"version": "0.0.1",
"description": "UI plugin for job search in Gauzy",
"author": {
Expand All @@ -9,39 +9,18 @@
},
"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"
"@angular/core": "^16.2.12"
},
"dependencies": {
"tslib": "^2.3.0"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ describe('JobSearchUiComponent', () => {
let component: JobSearchUiComponent;
let fixture: ComponentFixture<JobSearchUiComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [JobSearchUiComponent]
})
.compileComponents();

beforeEach(() => {
TestBed.configureTestingModule({
declarations: [JobSearchUiComponent]
});
fixture = TestBed.createComponent(JobSearchUiComponent);
component = fixture.componentInstance;
fixture.detectChanges();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { Component } from '@angular/core';

@Component({
selector: 'job-search-ui-plugin',
template: `<p>job-search-ui works!</p>`,
styles:[]
template: `<p>job-search-ui plugin works!!!!!!!!!!</p>`,
styles: []
})
export class JobSearchUiComponent {

constructor() {
console.log('loaded job search ui component');
}
}
17 changes: 9 additions & 8 deletions packages/plugins/job-search-ui/src/lib/job-search-ui.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { JobSearchUiComponent } from './job-search-ui.component';
import { JobSearchUiService } from './job-search-ui.service';

@NgModule({
imports: [CommonModule],
declarations: [JobSearchUiComponent],
exports: [JobSearchUiComponent],
providers: [JobSearchUiService]
declarations: [
JobSearchUiComponent
],
imports: [
],
exports: [
JobSearchUiComponent
]
})
export class JobSearchUiModule {}
export class JobSearchUiModule { }
5 changes: 2 additions & 3 deletions packages/plugins/job-search-ui/src/public-api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Public API Surface of job-search-ui
*/

export * from './lib/job-search-ui.module';
*/
export * from './lib/job-search-ui.service';
export * from './lib/job-search-ui.component';
export * from './lib/job-search-ui.module';
22 changes: 0 additions & 22 deletions packages/plugins/job-search-ui/src/test.ts

This file was deleted.

13 changes: 0 additions & 13 deletions packages/plugins/job-search-ui/tsconfig.json

This file was deleted.

22 changes: 11 additions & 11 deletions packages/plugins/job-search-ui/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": []
},
"exclude": [
"**/*.spec.ts"
]
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": []
},
"exclude": [
"**/*.spec.ts"
]
}
26 changes: 11 additions & 15 deletions packages/plugins/job-search-ui/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

0 comments on commit cc7241e

Please sign in to comment.