diff --git a/docs/src/examples/components/Dropdown/Types/DropdownExampleSingleSelection.shorthand.steps.ts b/docs/src/examples/components/Dropdown/Types/DropdownExampleSingleSelection.shorthand.steps.ts index 222f05a091..119cc75fb6 100644 --- a/docs/src/examples/components/Dropdown/Types/DropdownExampleSingleSelection.shorthand.steps.ts +++ b/docs/src/examples/components/Dropdown/Types/DropdownExampleSingleSelection.shorthand.steps.ts @@ -1,4 +1,4 @@ -import { Dropdown, Button, List } from '../../../../../../packages/react/src' +import { Dropdown, Button, List } from '@stardust-ui/react' const steps = [ steps => steps.click(`.${Dropdown.className} .${Button.className}`).snapshot('Shows list'), diff --git a/gulpfile.ts b/gulpfile.ts index 9c6836e186..c6c99016f1 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -1,10 +1,19 @@ import { task, series, parallel } from 'gulp' import * as path from 'path' +import * as tsPaths from 'tsconfig-paths' + +import config from './config' +const { compilerOptions } = require('./build/tsconfig.common.json') // add node_modules/.bin to the path so we can invoke .bin CLIs in tasks process.env.PATH = process.env.PATH + path.delimiter + path.resolve(__dirname, 'node_modules', '.bin') +tsPaths.register({ + baseUrl: config.path_base, + paths: compilerOptions.paths, +}) + // load tasks in order of dependency usage require('./build/gulp/tasks/dll') require('./build/gulp/tasks/dist') diff --git a/package.json b/package.json index b7b9451882..364900615e 100644 --- a/package.json +++ b/package.json @@ -160,6 +160,7 @@ "ts-jest": "^23.10.4", "ts-loader": "^5.3.0", "ts-node": "^6.1.0", + "tsconfig-paths": "^3.7.0", "tslint": "^5.11.0", "tslint-config-airbnb": "^5.11.1", "typescript": "~3.2.2", diff --git a/screener.config.js b/screener.config.js index fdac3b0a7a..d8a8d928e9 100644 --- a/screener.config.js +++ b/screener.config.js @@ -4,9 +4,16 @@ const _ = require('lodash') const glob = require('glob') const path = require('path') const fs = require('fs') +const tsPaths = require('tsconfig-paths') +const Steps = require('screener-runner/src/steps') const { default: config } = require('./config') -const Steps = require('screener-runner/src/steps') +const { compilerOptions } = require('./build/tsconfig.common.json') + +tsPaths.register({ + baseUrl: config.path_base, + paths: compilerOptions.paths, +}) const SCREENER_HOST_URL = `${config.server_host}:${config.server_port}` diff --git a/yarn.lock b/yarn.lock index 5316b0302f..6b0a2b4aa3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -326,6 +326,11 @@ resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.9.tgz#c16b55186ee73ae65e001fbee69d392c51337ad1" integrity sha512-wNMwXSUcwyYajtbayfPp55tSayuDVU6PfY5gzvRSj80UvxdXEJOVPnUVajaOp7NgXLm+1e2ZDLULmpsU9vDvQw== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= + "@types/lodash@^4.14.118": version "4.14.118" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.118.tgz#247bab39bfcc6d910d4927c6e06cbc70ec376f27" @@ -2660,7 +2665,7 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@^2.2.1: +deepmerge@^2.0.1, deepmerge@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" integrity sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA== @@ -6116,6 +6121,13 @@ json5@^0.5.0, json5@^0.5.1: resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -10589,6 +10601,17 @@ ts-node@^6.1.0: source-map-support "^0.5.6" yn "^2.0.0" +tsconfig-paths@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.7.0.tgz#02ae978db447b22e09dafcd4198be95c4885ceb2" + integrity sha512-7iE+Q/2E1lgvxD+c0Ot+GFFmgmfIjt/zCayyruXkXQ84BLT85gHXy0WSoQSiuFX9+d+keE/jiON7notV74ZY+A== + dependencies: + "@types/json5" "^0.0.29" + deepmerge "^2.0.1" + json5 "^1.0.1" + minimist "^1.2.0" + strip-bom "^3.0.0" + tslib@1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"