Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabiandev/jspm-tsc-update
Creates TypeScript path mappings from installed jspm packages.
https://github.com/fabiandev/jspm-tsc-update
jspm systemjs systemjs-builder tsconfig tsconfig-paths typescript
Last synced: about 2 months ago
JSON representation
Creates TypeScript path mappings from installed jspm packages.
- Host: GitHub
- URL: https://github.com/fabiandev/jspm-tsc-update
- Owner: fabiandev
- License: mit
- Created: 2017-07-01T23:03:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-29T10:23:09.000Z (about 7 years ago)
- Last Synced: 2024-10-03T09:07:57.913Z (3 months ago)
- Topics: jspm, systemjs, systemjs-builder, tsconfig, tsconfig-paths, typescript
- Language: JavaScript
- Homepage:
- Size: 85.9 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jspm-tsc-update
This package was created out of the need to have installed jspm packages
also mapped in tsconfig.json `compilerOptions.paths`. All packages installed via `jspm install` will be mapped, as well as peer dependencies. Custom aliases have to be added manually to `tsconfig.json`, but won't be overwritten.## Installation
```sh
$ yarn global add jspm-tsc-update
```> Or you can use: `npm install -g jspm-tsc-update`
## Usage
Make sure to be in the root of your project, where your `package.json` exists.
Also the files `system.config.js` and `tsconfig.json` must be available this location.```sh
$ jspm-tsc-update
```After executing the command from above, `compilerOptions.paths` in your `tsconfig.json` will be updated.
A file named `pathmap.json` will be created to keep track of deleted jspm packages, to safely remove them from
your TypeScript path mappings on the next run.## Local Usage
You may also install this package locally via `yarn add jspm-tsc-update` or `npm install --save-dev jspm-tsc-update`.
To create an alias for running the executable, add something like this to your `package.json` `scripts`:```json
{
"scripts": {
"update-paths": "node_modules/.bin/jspm-tsc-update"
}
}
```Now you just have to make sure to run this command alongside installing or uninstalling with jspm:
```
$ jspm install npm:css-animator && yarn update-paths
```> Or when using npm instead of yarn: `npm run update-paths`