Skip to content

Commit ec2e0e0

Browse files
committed
absolute path typings
1 parent 0a3e395 commit ec2e0e0

File tree

13 files changed

+34
-25
lines changed

13 files changed

+34
-25
lines changed

src/editor/commands/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as vscode from 'vscode'
22
import { join } from 'path'
33
import { setStorage } from '../storage'
44
import ReactWebView from '../ReactWebView'
5-
import * as CR from '../../typings'
5+
import * as CR from 'typings'
66

77
const COMMANDS = {
88
START: 'coderoad.start',

src/editor/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as vscode from 'vscode'
2-
import * as CR from '../typings'
2+
import * as CR from 'typings'
33
import { createCommands } from './commands'
44

55
interface Props {

src/state/message.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// import panel from '../views/Panel'
2-
import * as CR from '../typings'
2+
import * as CR from 'typings'
33

44
export const onSend = (action: CR.Action) => {
55
// if (!panel || !panel.currentPanel) {

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"experimentalDecorators": true,
2323
"emitDecoratorMetadata": true,
2424
"paths": {
25-
"typings": ["./typings/index.d.ts"],
25+
"typings": ["../typings/index.d.ts"],
2626
},
2727
},
2828
"exclude": [
File renamed without changes.

src/typings/index.d.ts renamed to typings/index.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { onReceive } from "state/message";
2-
31
export interface TutorialLevel {
42
stageList: string[]
53
content: {

web-app/src/components/Continue/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import CR from '../../../../src/typings'
2+
import CR from 'typings'
33

44
import ContinueItem from './ContinueItem'
55

web-app/src/components/Level/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import { Button, Card } from '@alifd/next'
3-
import CR from '../../../../src/typings'
3+
import CR from 'typings'
44

55
const styles = {
66
card: {

web-app/src/components/Stage/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import { Button, Card } from '@alifd/next'
3-
import CR from '../../../../src/typings'
3+
import CR from 'typings'
44

55
import Step from '../Step'
66

web-app/src/components/Step/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22
import { Checkbox } from '@alifd/next'
33
// import CC from '../../typings/client'
4-
import CR from '../../../../src/typings'
4+
import CR from 'typings'
55

66
const styles = {
77
card: {

web-app/src/components/Summary/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import { Button, Card } from '@alifd/next'
3-
import CR from '../../../../src/typings'
3+
import CR from 'typings'
44

55
const styles = {
66
card: {

web-app/tsconfig.json

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
2+
"extends": "./tsconfig.paths.json",
23
"compilerOptions": {
34
"target": "es5",
45
"lib": [
56
"dom",
7+
"dom.iterable",
68
"esnext"
79
],
810
"allowJs": true,
@@ -16,21 +18,9 @@
1618
"resolveJsonModule": true,
1719
"isolatedModules": true,
1820
"noEmit": true,
19-
"jsx": "preserve",
20-
"sourceMap": true,
21-
"rootDirs": ["src", "stories"],
22-
"baseUrl": "src",
23-
"outDir": "build"
21+
"jsx": "preserve"
2422
},
2523
"include": [
26-
"src",
27-
"../src/typings"
28-
],
29-
"exclude": [
30-
"node_modules",
31-
"build",
32-
"scripts",
33-
"jest",
34-
"public"
24+
"src"
3525
]
3626
}

web-app/tsconfig.paths.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": "src",
4+
"rootDirs": [
5+
"src",
6+
"stories"
7+
],
8+
"paths": {
9+
"typings": [
10+
"../../typings/index.d.ts"
11+
],
12+
}
13+
},
14+
"exclude": [
15+
"node_modules",
16+
"build",
17+
"scripts",
18+
"jest",
19+
"public"
20+
]
21+
}

0 commit comments

Comments
 (0)