Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 0ff4a1d

Browse files
committed
Revert "Remove tsconfig-paths?"
This reverts commit 26b95d0.
1 parent 9376b11 commit 0ff4a1d

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

build/screener/screener.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
require('@fluentui/internal-tooling/babel/register')
22

3+
const config = require('../../config').default
4+
const { compilerOptions } = require('../../build/tsconfig.docs.json')
5+
6+
require('tsconfig-paths').register({
7+
baseUrl: config.path_base,
8+
paths: compilerOptions.paths,
9+
})
10+
311
// https://github.com/screener-io/screener-runner
412
module.exports = {
513
projectRepo: 'microsoft/fluent-ui-react',

build/tsconfig.docs.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"extends": "./tsconfig.common.json",
33
"compilerOptions": {
4-
"module": "esnext"
4+
"module": "esnext",
5+
"paths": {
6+
"@fluentui/*": ["packages/*/src"]
7+
}
58
},
69
"include": ["../docs/src", "../packages/react/src", "../types"]
710
}

gulpfile.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
import { task, parallel } from 'gulp'
22
import * as path from 'path'
3+
import * as tsPaths from 'tsconfig-paths'
4+
5+
import config from './config'
6+
7+
const { compilerOptions } = require('./build/tsconfig.docs.json')
38

49
// add node_modules/.bin to the path so we can invoke .bin CLIs in tasks
510
process.env.PATH =
611
process.env.PATH + path.delimiter + path.resolve(__dirname, 'node_modules', '.bin')
712

13+
tsPaths.register({
14+
baseUrl: config.path_base,
15+
paths: compilerOptions.paths,
16+
})
17+
818
// load tasks in order of dependency usage
919
require('./build/gulp/tasks/bundle')
1020
require('./build/gulp/tasks/docs')

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
"syncpack": "^4.5.4",
151151
"through2": "^2.0.3",
152152
"tmp": "^0.0.33",
153+
"tsconfig-paths": "^3.7.0",
153154
"tslint": "^5.11.0",
154155
"tslint-config-airbnb": "^5.11.1",
155156
"tslint-config-prettier": "^1.18.0",

0 commit comments

Comments
 (0)