Skip to content

Commit

Permalink
fix(readme): fix something maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
tefkah committed Mar 9, 2023
1 parent ff61855 commit 6e4187a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libs/utils/readme/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@jote/utils/readme",
"name": "utils-readme",
"version": "0.0.1",
"main": "src/index.js",
"generators": "./generators.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UpdateReadmeExecutorSchema } from './schema'
import executor from './executor'
import { UpdateReadmeExecutorSchema } from './schema.d'
import executor from './executor.js'

const options: UpdateReadmeExecutorSchema = {}

Expand Down
6 changes: 3 additions & 3 deletions libs/utils/readme/src/executors/update-readme/executor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UpdateReadmeExecutorSchema } from './schema'
import { ExecutorContext, readProjectConfiguration, workspaceRoot } from '@nrwl/devkit'
import { ExecutorContext, workspaceRoot } from '@nrwl/devkit'
import { readmeAction } from './readmeAction'
import path from 'path'
import { exec } from 'child_process'
Expand All @@ -9,8 +9,8 @@ import { readFile } from 'fs/promises'
const execa = promisify(exec)

const getProjectRoot = (context: ExecutorContext) => {
if (!context.projectName) return context.cwd
const projectRoot = context.workspace.projects[context.projectName].root
if (!context.projectName || !context.workspace) return context.cwd
const projectRoot = context?.workspace.projects[context.projectName].root
return projectRoot
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { visit } from 'unist-util-visit'
import { EXIT } from 'unist-util-visit'
import { toString } from 'mdast-util-to-string'
import { BlockContent, Heading } from 'mdast'
import remarkParse from 'remark-parse'
import { readFile, writeFile } from 'fs/promises'
import { fromMarkdown } from 'mdast-util-from-markdown'
import remarkGfm from 'remark-gfm'
Expand Down
2 changes: 1 addition & 1 deletion libs/utils/readme/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './executors/update-readme/executor'
export * from './executors/update-readme/executor.js'

0 comments on commit 6e4187a

Please sign in to comment.