{"id":13481645,"url":"https://github.com/frankwallis/plugin-typescript","last_synced_at":"2025-04-04T12:10:36.937Z","repository":{"id":26372362,"uuid":"29821611","full_name":"frankwallis/plugin-typescript","owner":"frankwallis","description":"TypeScript loader for SystemJS","archived":false,"fork":false,"pushed_at":"2019-11-07T17:47:22.000Z","size":1507,"stargazers_count":248,"open_issues_count":9,"forks_count":47,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-05-21T11:17:55.980Z","etag":null,"topics":["systemjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frankwallis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-25T16:52:02.000Z","updated_at":"2023-12-19T17:37:27.000Z","dependencies_parsed_at":"2022-09-21T01:52:46.782Z","dependency_job_id":null,"html_url":"https://github.com/frankwallis/plugin-typescript","commit_stats":null,"previous_names":[],"tags_count":152,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankwallis%2Fplugin-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankwallis%2Fplugin-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankwallis%2Fplugin-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankwallis%2Fplugin-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frankwallis","download_url":"https://codeload.github.com/frankwallis/plugin-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174456,"owners_count":20896078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["systemjs","typescript"],"created_at":"2024-07-31T17:00:53.664Z","updated_at":"2025-04-04T12:10:36.918Z","avatar_url":"https://github.com/frankwallis.png","language":"TypeScript","readme":"plugin-typescript\n============================\nTypeScript loader for SystemJS\n\n[![build status](https://secure.travis-ci.org/frankwallis/plugin-typescript.png?branch=master)](http://travis-ci.org/frankwallis/plugin-typescript)\n\n## Overview ##\n\nA plugin for [SystemJS](https://github.com/systemjs/systemjs) which enables you to ```System.import``` TypeScript files directly. The files are transpiled in the browser and compilation errors written to the console.\n\nStarting with JSPM 0.17.0 (currently in beta) this plugin will be the officially supported mechanism for transpiling TypeScript. It provides the ability to transpile TypeScript and ES2015+ files on the fly when then are loaded by SystemJS.\n\nplugin-typescript supports TypeScript 2.0.0 and higher  \nFor TypeScript 1.8.1 use plugin-typescript 4.0.16  \nFor TypeScript 1.7.5 and below use plugin-typescript 2.x.x  \n\n## Installation ##\n\n#### JSPM ####\n\nInstall plugin-typescript like this:\n\n```sh\njspm install ts\n```\n\nAll the SystemJS configuration will be created automatically by JSPM.\n\n#### If you are using SystemJS without JSPM ####\n\nAdd SystemJS map configuration for plugin-typescript and typescript:\n\n```js\nSystemJS.config({\n  packages: {\n    \"ts\": {\n      \"main\": \"lib/plugin.js\"\n    },\n    \"typescript\": {\n      \"main\": \"lib/typescript.js\",\n      \"meta\": {\n        \"lib/typescript.js\": {\n          \"exports\": \"ts\"\n        }\n      }\n    }\n  },\n  map: {\n    \"ts\": \"path/to/plugin-typescript\",\n    \"typescript\": \"path/to/typescript\"\n  },\n  transpiler: 'ts'\n});\n```\n\n## Setup ##\n\n#### Make plugin-typescript the default transpiler for js and ts files ####\n\n```js\nSystem.config({\n  transpiler: \"ts\",\n  packages: {\n    \"app\": {\n      \"defaultExtension\": \"ts\",\n    }\n  }\n});\n```\n\nThis will tell SystemJS to transpile all modules (.js and .ts) using plugin-typescript. It is also possible to configure plugin-typescript to load specific files, using ```packages``` configuration\n\n```js\nSystem.config({\n  transpiler: \"babel\",\n  packages: {\n    \"src\": {\n      \"defaultExtension\": \"ts\",\n      \"meta\": {\n        \"*.ts\": {\n          \"loader\": \"ts\"\n        }\n      }\n    }\n  }\n});\n```\n\nThis will cause all .ts files in the \"src\" package to be loaded through plugin-typescript.\n\nSee the example projects contained within this repository for a working setup.\n\n## Configuration ##\n\nConfiguration settings can be passed to the compiler via \"typescriptOptions\":\n\n```js\nSystem.config({\n  typescriptOptions: {\n    module: \"system\",\n    noImplicitAny: true,\n    tsconfig: true                  // also accepts a path\n  }\n});\n```\n\nIt is also possible to override the default configuration for specific files, using ```meta``` configuration:\n\n```js\nSystem.config({\n  transpiler: \"typescript\",\n  packages: {\n    \"src\": {\n      \"defaultExtension\": \"ts\",\n      \"meta\": {\n         \"*.ts\": {\n            \"typescriptOptions\": {\n               \"noImplicitAny\": true\n            }\n         }\n      }\n    }\n  }\n});\n```\n\nAll the usual TypeScript compiler options are supported, as well as these additional ones:\n\n#### tsconfig ####\n\nA boolean flag which instructs the plugin to load configuration from \"tsconfig.json\". To override the location of the file set this option to the path of the configuration file, which will be resolved using normal SystemJS resolution.\n\nThe file location will be resolved using normal SystemJS resolution, and compiler options which do not conflict with those required by plugin-typescript will be loaded from the ```compilerOptions``` section of the file.\n\n## Features ##\n\n#### Hot-Reload support ####\n\nThe example projects show how to use plugin-typescript in conjuntion with [systemjs-hot-reloader](https://github.com/capaj/systemjs-hot-reloader)\n\n#### Rollup support ####\n\nRollup is supported when transpiling with ```module: \"es6\"```. It can help to reduce the size of your bundles by stripping out unused modules. For more information see [here](https://github.com/rollup/rollup)\n\n#### Link to source from transpiler errors ####\n\nWhen compiling in the browser, transpiler errors contain a link to the exact location of the error in the source. This is particularly helpful if you are using Chrome DevTools as your IDE.\n\n#### Override TypeScript version ####\n\nTo override the version of TypeScript used by the plugin, add an override to the ```jspm``` section of your package.json\n\n```json\n\t\"devDependencies\": {\n\t\t\"css\": \"systemjs/plugin-css@0.1.10\",\n\t\t\"ts\": \"frankwallis/plugin-typescript@^7.0.5\"\n\t},\n\t\"overrides\": {\n\t\t\"github:frankwallis/plugin-typescript@5.0.1\": {\n\t \t\t\"dependencies\": {\n\t    \t\t\"typescript\": \"npm:typescript@2.3.0-dev.20170228\"\n\t  \t\t}\n\t\t}\n\t}\n```\n\n## Examples ##\n\nTo run the example projects:\n```\n\u003e git clone https://github.com/frankwallis/plugin-typescript.git\n\u003e cd plugin-typescript\n\u003e npm install\n\u003e cd examples/react  \t\t// or examples/angular2 or examples/angular\n\u003e jspm install\n\u003e npm start\n```\nTo bundle each example project:\n```\n\u003e npm run build \t\t\t// or jspm build src build/build.js\n```\n","funding_links":[],"categories":["Awesome Angular [![Awesome TipeIO](https://img.shields.io/badge/Awesome%20Angular-@TipeIO-6C6AE7.svg)](https://github.com/gdi2290/awesome-angular) [![Awesome devarchy.com](https://img.shields.io/badge/Awesome%20Angular-@devarchy.com-86BDC1.svg)](https://github.com/brillout/awesome-angular-components)","Uncategorized"],"sub_categories":["Angular \u003ca id=\"angular\"\u003e\u003c/a\u003e","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankwallis%2Fplugin-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrankwallis%2Fplugin-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankwallis%2Fplugin-typescript/lists"}