0.4.0 • Published 6 years ago
karma-typescript-preprocessor v0.4.0
karma-typescript-preprocessor
Preprocessor to compile TypeScript on the fly.
Installation
npm install karma-typescript-preprocessor --save-dev
Configuration
The code below shows the sample configuration of the preprocessor.
// karma.conf.js
module.exports = function(config) {
config.set({
preprocessors: {
'**/*.ts': ['typescript']
},
typescriptPreprocessor: {
// options passed to the typescript compiler
options: {
sourceMap: false, // (optional) Generates corresponding .map file.
target: 'ES5', // (optional) Specify ECMAScript target version: 'ES3' (default), or 'ES5'
module: 'amd', // (optional) Specify module code generation: 'commonjs' or 'amd'
noImplicitAny: true, // (optional) Warn on expressions and declarations with an implied 'any' type.
noResolve: true, // (optional) Skip resolution and preprocessing.
removeComments: true, // (optional) Do not emit comments to output.
concatenateOutput: false // (optional) Concatenate and emit output to single file. By default true if module option is omited, otherwise false.
},
// transforming the filenames
transformPath: function(path) {
return path.replace(/\.ts$/, '.js');
}
}
});
};
If you set the sourceMap
option to true
then the generated source map will be inlined as a data-uri.
All TypeScript compiler options are defined here.
For more information on Karma see the homepage.
0.4.0
6 years ago
0.3.2
6 years ago
0.3.1
7 years ago
0.3.0
8 years ago
0.2.1
8 years ago
0.2.0
8 years ago
0.1.3
8 years ago
0.1.2
8 years ago
0.1.1
8 years ago
0.1.0
8 years ago
0.0.22
8 years ago
0.0.21
9 years ago
0.0.20
9 years ago
0.0.19
9 years ago
0.0.18
9 years ago
0.0.17
9 years ago
0.0.16
9 years ago
0.0.15
9 years ago
0.0.14
9 years ago
0.0.13
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
9 years ago
0.0.9
10 years ago
0.0.8
10 years ago
0.0.7
10 years ago
0.0.6
10 years ago
0.0.5
10 years ago
0.0.4
10 years ago
0.0.2
10 years ago