mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-22 01:03:20 +01:00
replace ts-node with tsx
This commit is contained in:
parent
de2f1227d2
commit
0901a3659b
3284
package-lock.json
generated
3284
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -19,9 +19,9 @@
|
||||
"format": "prettier --write 'src/**/*.{ts,tsx,css}'",
|
||||
"jest": "jest --coverage -c tests/jest.config.ts",
|
||||
"test": "NODE_ENV=test npm run prebuild && npm run lint && npm run typecheck && npm run jest",
|
||||
"new": "ts-node-esm ./scripts/new.ts",
|
||||
"favicon": "ts-node-esm ./scripts/favicon.ts",
|
||||
"prebuild": "ts-node-esm ./scripts/prebuild.ts"
|
||||
"new": "node --import tsx/esm ./scripts/new.ts",
|
||||
"favicon": "node --import tsx/esm ./scripts/favicon.ts",
|
||||
"prebuild": "node --import tsx/esm ./scripts/prebuild.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@giphy/js-fetch-api": "^5.3.0",
|
||||
@ -59,11 +59,11 @@
|
||||
"slugify": "^1.6.6",
|
||||
"stylelint": "^16.2.1",
|
||||
"stylelint-prettier": "^5.0.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsx": "^4.7.0",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20"
|
||||
"node": "^20.6.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 0.2%",
|
||||
|
@ -1,11 +1,11 @@
|
||||
import fs from 'fs'
|
||||
import yaml from 'js-yaml'
|
||||
import ora from 'ora'
|
||||
import { join } from 'path'
|
||||
import type ProjectType from '@/types/project.js'
|
||||
import { transformProject } from './transformProject.js'
|
||||
import path from 'path'
|
||||
import type ProjectType from '@/types/project'
|
||||
import { transformProject } from './transformProject'
|
||||
|
||||
const contentDirectory = join(process.cwd(), '_content')
|
||||
const contentDirectory = path.join(process.cwd(), '_content')
|
||||
const projectsOriginal = yaml.load(
|
||||
fs.readFileSync(`${contentDirectory}/projects.yml`, 'utf8')
|
||||
) as ProjectType[]
|
||||
|
@ -2,7 +2,7 @@ import fs from 'fs'
|
||||
import { join } from 'path'
|
||||
import sharp from 'sharp'
|
||||
import type ImageType from '@/types/image'
|
||||
import { rgbDataURL } from './rgbDataURL.js'
|
||||
import { rgbDataURL } from './rgbDataURL'
|
||||
|
||||
const imagesDirectory = join(process.cwd(), 'public', 'images')
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import ProjectType from '../../src/types/project'
|
||||
import { getProjectImages } from './images.js'
|
||||
import { markdownToHtml } from './markdown.js'
|
||||
import ProjectType from '@/types/project'
|
||||
import { getProjectImages } from './images'
|
||||
import { markdownToHtml } from './markdown'
|
||||
|
||||
export async function transformProject(
|
||||
projectsOriginal: ProjectType[],
|
||||
|
@ -1,3 +1,3 @@
|
||||
import { generateProjects } from './content/generateProjects.js'
|
||||
import { generateProjects } from './content/generateProjects'
|
||||
|
||||
generateProjects()
|
||||
|
Loading…
Reference in New Issue
Block a user