GitXplorerGitXplorer
a

typescript-with-globs

public
6 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
ac63cf7a20f75626aee7c817a31af7e14a4e3603

Update tsconfig inline

aalexdima committed 9 years ago
Unverified
de31fbe446f5ac65c2ca6e8e4d334e9d581d3587

Fix readme

aalexdima committed 9 years ago
Unverified
942aa596097dff544a37003a6a1c2f2cc1e46d08

More fixes in package.json

aalexdima committed 9 years ago
Unverified
4d9053b0c6776a94cc2d21b16173e34506a36e65

Fix issue in package.json

aalexdima committed 9 years ago
Unverified
8cb0a55885db75880217643b037cbf03e22d14b8

Use `filesGlob` instead of `include`

aalexdima committed 9 years ago
Unverified
2f30388ec71351405c16a511a1f4efe4d1c84acc

Add readme & license

aalexdima committed 9 years ago

README

The README file for this repository.

TypeScript with globs

Simple utility that understands glob patterns in tsconfig.json.

Friends don't let friends maintain lists of files.

Installing

Install side-by-side with typescript. e.g.:

npm install typescript
npm install typescript-with-globs

Using

Add a new property called filesGlob where you can use glob patterns: e.g. tsconfig.json:

{
    "compilerOptions": {
        "module": "amd",
        "outDir": "out",
        "target": "es5"
    },
    "filesGlob": [
        "src/*.ts",
        "lib/*.d.ts",
        "node_modules/monaco-editor-core/monaco.d.ts"
    ]
}

Instead of tsc, run tscg (note the extra g in the name). This first updates tsconfig.json with the found files and then invokes tsc with the same arguments.

The files property is generated with all the filenames the glob has found. e.g. updated tsconfig.json:

{
  "compilerOptions": {
    "module": "amd",
    "outDir": "out",
    "target": "es5"
  },
  "filesGlob": [
    "src/*.ts",
    "lib/*.d.ts",
    "node_modules/monaco-editor-core/monaco.d.ts"
  ],
  "files": [
    "src/languageFeatures.ts",
    "src/mode.ts",
    "src/monaco.contribution.ts",
    "src/tokenization.ts",
    "src/typescript.ts",
    "src/worker.ts",
    "src/workerManager.ts",
    "lib/lib-es6-ts.d.ts",
    "lib/lib-ts.d.ts",
    "lib/typescriptServices.d.ts",
    "node_modules/monaco-editor-core/monaco.d.ts"
  ]
}

License

MIT