Revert "Use Typescript project references, improve functions build/deploy (#575)"
This reverts commit 4edad9f19b
.
This commit is contained in:
parent
54356b8d2f
commit
1e904f567a
4
.github/workflows/check.yml
vendored
4
.github/workflows/check.yml
vendored
|
@ -48,8 +48,8 @@ jobs:
|
|||
- name: Run Typescript checker on web client
|
||||
if: ${{ success() || failure() }}
|
||||
working-directory: web
|
||||
run: tsc -b -v --pretty
|
||||
run: tsc --pretty --project tsconfig.json --noEmit
|
||||
- name: Run Typescript checker on cloud functions
|
||||
if: ${{ success() || failure() }}
|
||||
working-directory: functions
|
||||
run: tsc -b -v --pretty
|
||||
run: tsc --pretty --project tsconfig.json --noEmit
|
||||
|
|
5
common/.gitignore
vendored
5
common/.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
# Compiled JavaScript files
|
||||
lib/
|
||||
lib/**/*.js
|
||||
lib/**/*.js.map
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
@ -9,4 +10,4 @@ node_modules/
|
|||
|
||||
package-lock.json
|
||||
ui-debug.log
|
||||
firebase-debug.log
|
||||
firebase-debug.log
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "../",
|
||||
"composite": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"noImplicitReturns": true,
|
||||
"outDir": "lib",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"functions": {
|
||||
"predeploy": "cd functions && yarn build",
|
||||
"predeploy": "npm --prefix \"$RESOURCE_DIR\" run build",
|
||||
"runtime": "nodejs16",
|
||||
"source": "functions/dist"
|
||||
"source": "functions"
|
||||
},
|
||||
"firestore": {
|
||||
"rules": "firestore.rules",
|
||||
|
|
6
functions/.gitignore
vendored
6
functions/.gitignore
vendored
|
@ -2,11 +2,9 @@
|
|||
.env*
|
||||
.runtimeconfig.json
|
||||
|
||||
# GCP deployment artifact
|
||||
dist/
|
||||
|
||||
# Compiled JavaScript files
|
||||
lib/
|
||||
lib/**/*.js
|
||||
lib/**/*.js.map
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
"firestore": "dev-mantic-markets.appspot.com"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn compile && rm -rf dist && mkdir -p dist/functions && cp -R ../common/lib dist/common && cp -R lib/src dist/functions/src && cp ../yarn.lock dist && cp package.json dist",
|
||||
"compile": "tsc -b",
|
||||
"build": "tsc",
|
||||
"watch": "tsc -w",
|
||||
"shell": "yarn build && firebase functions:shell",
|
||||
"start": "yarn shell",
|
||||
|
@ -19,7 +18,7 @@
|
|||
"db:backup-remote": "yarn db:rename-remote-backup-folder && gcloud firestore export gs://$npm_package_config_firestore/firestore_export/",
|
||||
"verify": "(cd .. && yarn verify)"
|
||||
},
|
||||
"main": "functions/src/index.js",
|
||||
"main": "lib/functions/src/index.js",
|
||||
"dependencies": {
|
||||
"@amplitude/node": "1.10.0",
|
||||
"fetch": "1.1.0",
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "../",
|
||||
"composite": true,
|
||||
"module": "commonjs",
|
||||
"noImplicitReturns": true,
|
||||
"outDir": "lib",
|
||||
|
@ -9,11 +8,6 @@
|
|||
"strict": true,
|
||||
"target": "es2017"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../common"
|
||||
}
|
||||
],
|
||||
"compileOnSave": true,
|
||||
"include": ["src"]
|
||||
"include": ["src", "../common/**/*.ts"]
|
||||
}
|
||||
|
|
|
@ -4,9 +4,6 @@ const API_DOCS_URL = 'https://docs.manifold.markets/api'
|
|||
module.exports = {
|
||||
staticPageGenerationTimeout: 600, // e.g. stats page
|
||||
reactStrictMode: true,
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
experimental: {
|
||||
externalDir: true,
|
||||
optimizeCss: true,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"composite": true,
|
||||
"baseUrl": "../",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
|
@ -17,15 +16,10 @@
|
|||
"jsx": "preserve",
|
||||
"incremental": true
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../common"
|
||||
}
|
||||
],
|
||||
|
||||
"watchOptions": {
|
||||
"excludeDirectories": [".next"]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "../common/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user