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

chore(package): get working paths option for ts-node #837

Merged
merged 4 commits into from
Feb 6, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Dropdown, Button, List } from '../../../../../../packages/react/src'
import { Dropdown, Button, List } from '@stardust-ui/react'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


const steps = [
steps => steps.click(`.${Dropdown.className} .${Button.className}`).snapshot('Shows list'),
Expand Down
8 changes: 8 additions & 0 deletions gulpfile.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import { task, series, parallel } from 'gulp'
import * as path from 'path'
import * as tsPaths from 'tsconfig-paths'

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: '.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we use repo's path from config constant here as well? This will ensure consistency in the approach taken (there will be always single source of truth maintained)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it 👍

paths: compilerOptions.paths,
})

// load tasks in order of dependency usage
require('./build/gulp/tasks/dll')
require('./build/gulp/tasks/dist')
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,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",
Expand Down
9 changes: 8 additions & 1 deletion screener.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '.',
paths: compilerOptions.paths,
})

const SCREENER_HOST_URL = `${config.server_host}:${config.server_port}`

Expand Down
25 changes: 24 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"

[email protected]:
version "1.9.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
Expand Down