forked from typed-ember/ember-cli-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
32 lines (24 loc) · 778 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* jshint node: true */
'use strict';
var path = require('path');
var process = require('process');
var TsPreprocessor = require('./lib/typescript-preprocessor');
module.exports = {
name: 'ember-cli-typescript',
included: function(app) {
this._super.included.apply(this, arguments);
this.app = app;
},
blueprintsPath: function() {
return path.join(__dirname, 'blueprints');
},
setupPreprocessorRegistry: function(type, registry) {
try {
var plugin = new TsPreprocessor({includeExtensions: ['.ts','.js']});
registry.add('js', plugin);
} catch ( ex ) {
console.log( "Missing or invalid tsconfig.json, please fix or run `ember generate ember-cli-typescript`." );
console.log( ' ' + ex.toString());
}
}
};