Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsc-wildcard-resolve

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsc-wildcard-resolve

A tool for resolving typescript modules defined in tsconfig.json

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by600%
Maintainers
1
Weekly downloads
 
Created
Source

tsc-wildcard-resolve

A tool for resolving typescript modules defined in tsconfig.json

Installation

# Local package
$ npm i tsc-wildcard-resolve --save-dev

# Global CLI
$ npm i -g tsc-wildcard-resolve

Usage

NPM task

$ npm i tsc-wildcard-resolve --save-dev

"scripts": {
    "compile": "tsc",
    "build": "compile && tsc-wildcard-resolve"
}

$ npm run build

CLI

$ npm i -g tsc-wildcard-resolve

$ tsc-wildcard-resolve
$ tsc-wildcard-resolve -p tsconfig.prod.json
$ tsc-wildcard-resolve -p ./conf/tsconfig.dev.json
$ tsc-wildcard-resolve -p ./conf/
$ tsc-wildcard-resolve -p ../

TypeScript

import { tscResolve } from "tsc-wildcard-resolve"
import * as path from "path"

// Simple ./tsconfig.json
const configPath = process.cwd();
tscResolve(configPath)
    .then(() => { /*DONE*/ });

// Specific tsconfig.json
const configPath = path.join(process.cwd(), "tsconfig.prod.json");
tscResolve(configPath)
    .then(() => { /*DONE*/ });

// Specific tsconfig.json in different folder
const configPath = path.resolve(process.cwd(), "../conf/tsconfig.dev.json");
tscResolve(configPath)
    .then(() => { /*DONE*/ });

// Async/Await
const configPath = process.cwd();
await tscResolve(configPath);

JavaScript

const tscResolver = require("tsc-wildcard-resolve");
const path = require("path");

// Simple ./tsconfig.json
const configPath = process.cwd();
tscResolve(configPath)
    .then(() => { /*DONE*/ });

// Specific tsconfig.json
const configPath = path.join(process.cwd(), "tsconfig.prod.json");
tscResolve(configPath)
    .then(() => { /*DONE*/ });

// Specific tsconfig.json in different folder
const configPath = path.resolve(process.cwd(), "../conf/tsconfig.dev.json");
tscResolve(configPath)
    .then(() => { /*DONE*/ });

// Async/Await
const configPath = process.cwd();
await tscResolve(configPath);

Keywords

FAQs

Package last updated on 08 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc