Skip to content

Commit

Permalink
update tool prepare-husky and modify import_map
Browse files Browse the repository at this point in the history
  • Loading branch information
EdixonAlberto committed Feb 13, 2023
1 parent 1e08bad commit 0aab60d
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions import_map.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"imports": {
"$src/": "./src/",
"$/": "./src/",
"$deps": "./deps.ts",
"$types": "./src/types.ts",
"$front/": "./demo/",
"$fresh/": "https://deno.land/x/[email protected]/",
"preact": "https://esm.sh/preact@10.11.0",
"preact/": "https://esm.sh/preact@10.11.0/",
"preact": "https://cdn.skypack.dev/preact",
"preact/": "https://cdn.skypack.dev/preact/",
"preact-render-to-string": "https://esm.sh/*[email protected]",
"@preact/signals": "https://esm.sh/*@preact/[email protected]",
"@preact/signals-core": "https://esm.sh/*@preact/[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/docs.controller.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Context, renderToString } from '$deps'
import { Docs } from '$src/components/Docs.tsx'
import { Docs } from '$/components/Docs.tsx'

// deno-lint-ignore no-explicit-any
function render(jsx: any, props?: any) {
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/jobs.controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Context } from '$deps'
import jobs from '$src/data/jobs.json' assert { 'type': 'json' }
import { ResponseDto } from '$src/dto/Response.dto.ts'
import jobs from '$/data/jobs.json' assert { 'type': 'json' }
import { ResponseDto } from '$/dto/Response.dto.ts'
import { IJob } from '$types'

export function getJobs(ctx: Context): void {
Expand Down
4 changes: 2 additions & 2 deletions src/routes/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Router } from '$deps'
import { getJobs } from '$src/controllers/jobs.controller.ts'
import { getDocs } from '$src/controllers/docs.controller.ts'
import { getJobs } from '$/controllers/jobs.controller.ts'
import { getDocs } from '$/controllers/docs.controller.ts'

const router = new Router()

Expand Down
4 changes: 2 additions & 2 deletions src/scraping/jobs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Cheerio, CheerioAPI, Element } from '$deps'
import { ConfigService } from '$src/services/Config.service.ts'
import { ScraperService } from '$src/services/Scraper.service.ts'
import { ConfigService } from '$/services/Config.service.ts'
import { ScraperService } from '$/services/Scraper.service.ts'
import type { IJob, TJobDetails, TJobPartial } from '$types'

export async function scrapeJobs(): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/services/Server.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Application, CORS } from '$deps'
import { routes } from '$src/routes/index.ts'
import { routes } from '$/routes/index.ts'
import { ConfigService } from './Config.service.ts'

export class ServerService {
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ export type TJobDetails = {
postulations: number
}

export type TResponseAPI = import('$src/dto/Response.dto.ts').ResponseDto
export type TResponseAPI = import('$/dto/Response.dto.ts').ResponseDto
4 changes: 2 additions & 2 deletions test/main_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { superoak } from '$deps'
import { ServerService } from '$src/services/Server.service.ts'
import jobs from '$src/data/jobs.json' assert { 'type': 'json' }
import { ServerService } from '$/services/Server.service.ts'
import jobs from '$/data/jobs.json' assert { 'type': 'json' }

const server = new ServerService()

Expand Down
2 changes: 1 addition & 1 deletion tools/prepare-husky.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import { install, set } from '$deps';

install();

set('.husky/pre-commit', 'deno task update-lock && deno fmt && deno lint');
set('.husky/pre-commit', 'deno task update-lock && deno fmt && deno lint && deno task test');

0 comments on commit 0aab60d

Please sign in to comment.