mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
b9565bc290
This is an initial start to using TypeScript in our non-core Ghost packages. - Adds a prepare script to build the project after installing deps - Adds an initial tsconfig.json which is compatible with our node env - Migrates all of the code to TypeScript, including tests - Updates tests to use ts-node so that we don't need to compile the tests - ts-node is installed at the top level because the env is weird with lerna and doesn't work otherwise - Updates the yarn dev script to build the project with the --all and --revisions flag
32 lines
996 B
JSON
32 lines
996 B
JSON
{
|
|
"name": "@tryghost/post-revisions",
|
|
"version": "0.0.0",
|
|
"repository": "https://github.com/TryGhost/Ghost/tree/main/packages/post-revisions",
|
|
"author": "Ghost Foundation",
|
|
"private": true,
|
|
"main": "build/index.js",
|
|
"types": "build/index.d.ts",
|
|
"scripts": {
|
|
"dev": "tsc --watch --preserveWatchOutput --sourceMap",
|
|
"build": "tsc",
|
|
"prepare": "tsc",
|
|
"test:types": "tsc --noEmit",
|
|
"test:unit": "NODE_ENV=testing c8 --src src --all --check-coverage --100 --reporter text --reporter cobertura mocha -r ts-node/register './test/**/*.test.ts'",
|
|
"test": "yarn test:unit && yarn test:types",
|
|
"lint:code": "eslint src/ --ext .ts --cache",
|
|
"lint": "yarn lint:code && yarn lint:test",
|
|
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .ts --cache"
|
|
},
|
|
"files": [
|
|
"build"
|
|
],
|
|
"devDependencies": {
|
|
"c8": "7.13.0",
|
|
"mocha": "10.2.0",
|
|
"sinon": "15.0.3",
|
|
"ts-node": "10.9.1",
|
|
"typescript": "5.0.4"
|
|
},
|
|
"dependencies": {}
|
|
}
|