Skip to content

Commit

Permalink
Use TypeScript project references for compatible projects
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnwalraven committed Nov 4, 2018
1 parent e5ae5d1 commit 5f287d9
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 23 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@
"scripts": {
"clean": "git clean -dfqX -- ./node_modules **/{lib,node_modules}/",
"postinstall": "lerna run prepare",
"build": "lerna run build",
"watch": "lerna run watch --stream --no-sort --concurrency 20",
"build": "lerna run build && npm run compile",
"compile": "tsc --build tsconfig.json",
"compile:clean": "tsc --build tsconfig.json --clean",
"watch": "tsc --build tsconfig.json --watch",
"lint": "prettier --list-different \"packages/*/src/**/*.{js,jsx,ts,tsx}\"",
"lint-fix": "prettier --write \"packages/*/src/**/*.{js,jsx,ts,tsx}\"",
"test": "jest --verbose",
"posttest": "npm run lint",
"circle": "npm run test -- --ci --maxWorkers=2",
"precommit": "lint-staged",
"release": "npm run clean && npm ci && lerna publish --exact",
"packageExtension": "lerna run packageExtension --scope=apollo-vscode"
"package-extension": "lerna run package-extension --scope=apollo-vscode"
},
"engines": {
"node": ">=8",
Expand Down
10 changes: 2 additions & 8 deletions packages/apollo-language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,9 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"compile": "tsc --build tsconfig.json",
"compile:clean": "tsc --build tsconfig.json --clean",
"watch": "tsc --build tsconfig.json --watch",
"install-dependencies-into-extension": "yarn install --no-lockfile --force --production --modules-folder ../apollo-vscode/server/node_modules",
"prepare": "npm run clean && npm run install-dependencies-into-extension",
"clean": "rm -rf ../apollo-vscode/server",
"prebuild": "npm run clean",
"build": "npm run install-dependencies-into-extension && tsc -p .",
"watchOnly": "tsc -w -p .",
"prepare": "npm run build"
"install-dependencies-into-extension": "yarn install --no-lockfile --force --production --modules-folder ../apollo-vscode/server/node_modules"
},
"engines": {
"node": "*"
Expand Down
6 changes: 5 additions & 1 deletion packages/apollo-language-server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
"composite": true,
"outDir": "../apollo-vscode/server",
"skipLibCheck": true,
},
"include": ["./src/**/*"],
"exclude": [ "**/__tests__/*", "**/__mocks__/*" ]
"exclude": [ "**/__tests__/*", "**/__mocks__/*" ],
"references": [
{ "path": "../apollo" }
]
}
7 changes: 1 addition & 6 deletions packages/apollo-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
"main": "./lib/extension",
"types": "lib/index.d.ts",
"scripts": {
"clean": "rm -rf lib",
"prebuild": "npm run clean",
"build": "tsc",
"watch": "tsc -w -p .",
"prepare": "npm run build",
"postinstall": "npm run update-vscode",
"update-vscode": "node ../../node_modules/vscode/bin/install",
"packageExtension": "npm run build && npm update --production && ../../node_modules/vsce/out/vsce package --baseContentUrl https://raw.githubusercontent.com/apollographql/apollo-cli/master/packages/apollo-vscode && git clean -dfqX -- ./node_modules"
"package-extension": "npm run build && npm update --production && ../../node_modules/vsce/out/vsce package --baseContentUrl https://raw.githubusercontent.com/apollographql/apollo-cli/master/packages/apollo-vscode && git clean -dfqX -- ./node_modules"
},
"engines": {
"vscode": "^1.28.0"
Expand Down
1 change: 1 addition & 0 deletions packages/apollo-vscode/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
"composite": true,
"outDir": "lib"
},
"include": ["./src/**/*"],
Expand Down
5 changes: 0 additions & 5 deletions packages/apollo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
"apollo": "./bin/run"
},
"scripts": {
"clean": "rm -rf lib",
"prebuild": "npm run clean",
"build": "tsc",
"watch": "tsc-watch --onSuccess \"cp -r . ../apollo-vscode/server/node_modules/apollo\"",
"prepare": "npm run build",
"prepack": "oclif-dev manifest && oclif-dev readme",
"postpack": "rm -f oclif.manifest.json",
"version": "oclif-dev readme && git add README.md"
Expand Down
1 change: 1 addition & 0 deletions packages/apollo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
"composite": true,
"outDir": "lib",
"noImplicitAny": false,
"lib": ["es2017"],
Expand Down
12 changes: 12 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"composite": true
},
"files": [],
"include": [],
"references": [
{ "path": "./packages/apollo" },
{ "path": "./packages/apollo-language-server" },
{ "path": "./packages/apollo-vscode" },
]
}

0 comments on commit 5f287d9

Please sign in to comment.