Skip to content

Commit

Permalink
feat: update default project files
Browse files Browse the repository at this point in the history
  • Loading branch information
klaascuvelier committed Apr 13, 2023
1 parent 3d07d80 commit c38d478
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
16 changes: 16 additions & 0 deletions packages/nx-deno-deploy/src/executors/lint/executor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ExecutorContext } from '@nrwl/devkit';
import { FsTree } from '@nrwl/tao/src/shared/tree';
import { readProjectConfiguration } from '@nrwl/devkit';
import { lintProject } from '../../lib/deploy-ctl';

export default async function lintExecutor(
options: unknown,
context: ExecutorContext
) {
const { projectName } = context;
const tree = new FsTree(process.cwd(), false);
const projectConfiguration = readProjectConfiguration(tree, projectName);
const sourceRoot = projectConfiguration.sourceRoot;

return lintProject(sourceRoot);
}
9 changes: 9 additions & 0 deletions packages/nx-deno-deploy/src/executors/lint/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://json-schema.org/schema",
"cli": "nx",
"title": "Lint executor",
"description": "Lint a Deno project",
"type": "object",
"properties": {},
"required": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"strict": true
},
"imports": {
"server": "https://deno.land/std@0.182.0/http/server.ts"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serve } from "https://deno.land/std@0.120.0/http/server.ts";
import { serve } from "server";

function handler(req: Request): Response {
return new Response("Hello from <%= name %>");
Expand Down

0 comments on commit c38d478

Please sign in to comment.