Skip to content

Commit

Permalink
feat: add ts-morph starter
Browse files Browse the repository at this point in the history
  • Loading branch information
linbudu599 committed Mar 29, 2022
1 parent 6b58ff0 commit b9eb30c
Show file tree
Hide file tree
Showing 12 changed files with 255 additions and 319 deletions.
3 changes: 0 additions & 3 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ prefer-frozen-lockfile=true
auto-install-peers=false
strict-peer-dependencies=false
recursive-install=true
# for package publish
# registry=https://registry.npmjs.org/
# for faster dep installation
registry=https://registry.npmmirror.com
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"pnpm-vscode-helper.extraWorkspaceScripts": [],
"pnpm-vscode-helper.workspacePackageGroups": [
["ApolloRelated", ["apollo-elements-app", "apollo-server-starter"]]
]
"pnpm-vscode-helper.extraWorkspaceScripts": ["build:tmp", "develop"]
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"ts-node": "^10.5.0",
"ts-node-dev": "^1.1.8",
"type-fest": "^2.12.0",
"typescript": "^4.6.2",
"vitepress": "^0.22.3"
"typescript": "^4.6.2"
}
}
5 changes: 2 additions & 3 deletions packages/apollo-element-starter/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"main": "index.html",
"private": true,
"name": "apollo-elements-app",
"version": "1.0.0",
"version": "2.0.0",
"type": "module",
"author": "",
"license": "ISC",
Expand Down Expand Up @@ -49,4 +48,4 @@
"typescript": "^4.x"
},
"keywords": []
}
}
6 changes: 3 additions & 3 deletions packages/cra-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/jest-dom": "^5.16.3",
"@testing-library/react": "^12.1.4",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.23",
"@types/react": "^17.0.42",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.0",
"typescript": "^4.6.2",
"typescript": "^4.6.3",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
16 changes: 16 additions & 0 deletions packages/ts-morph/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "ts-morph",
"version": "0.0.1",
"description": "",
"main": "./dist/index.js",
"license": "MIT",
"scripts": {
"build": "tsc",
"dev": "tsnd --respawn --transpile-only src/index.ts",
"watch": "tsc --watch",
"check": "tsc --noEmit"
},
"dependencies": {
"ts-morph": "^14.0.0"
}
}
Empty file.
5 changes: 5 additions & 0 deletions packages/ts-morph/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Project, SourceFile } from 'ts-morph';

const p = new Project();

const s = p.addSourceFileAtPath('./fixtures.ts');
20 changes: 20 additions & 0 deletions packages/ts-morph/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"target": "ES2018",
"module": "commonjs",
"lib": [
"esnext"
],
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true,
"skipLibCheck": true,
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true
},
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion packages/vitepress-starter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vitepress-starter",
"version": "0.0.1",
"version": "0.1.1-1",
"description": "",
"main": "./dist/index.js",
"license": "MIT",
Expand Down
Loading

0 comments on commit b9eb30c

Please sign in to comment.