@@ -3,7 +3,6 @@ var makeTypeScriptGlobal_1 = require("../typescript/makeTypeScriptGlobal");
3
3
makeTypeScriptGlobal_1 . makeTsGlobal ( atomConfig . typescriptServices ) ;
4
4
var path = require ( 'path' ) ;
5
5
var fs = require ( 'fs' ) ;
6
- var apd = require ( 'atom-package-dependencies' ) ;
7
6
var mainPanelView_1 = require ( "./atom/views/mainPanelView" ) ;
8
7
var autoCompleteProvider = require ( './atom/autoCompleteProvider' ) ;
9
8
var tooltipManager = require ( './atom/tooltipManager' ) ;
@@ -151,29 +150,7 @@ function readyToActivate() {
151
150
commands . registerCommands ( ) ;
152
151
}
153
152
function activate ( state ) {
154
- var linter = apd . require ( 'linter' ) ;
155
- var acp = apd . require ( 'autocomplete-plus' ) ;
156
- if ( ! linter || ! acp ) {
157
- var notification = atom . notifications . addInfo ( 'AtomTS: Some dependencies not found. Running "apm install" on these for you. Please wait for a success confirmation!' , { dismissable : true } ) ;
158
- apd . install ( function ( ) {
159
- atom . notifications . addSuccess ( "AtomTS: Dependencies installed correctly. Enjoy TypeScript \u2665" , { dismissable : true } ) ;
160
- notification . dismiss ( ) ;
161
- if ( atom . packages . isPackageDisabled ( 'linter' ) )
162
- atom . packages . enablePackage ( 'linter' ) ;
163
- if ( atom . packages . isPackageDisabled ( 'autocomplete-plus' ) )
164
- atom . packages . enablePackage ( 'autocomplete-plus' ) ;
165
- if ( ! apd . require ( 'linter' ) )
166
- atom . packages . loadPackage ( 'linter' ) ;
167
- if ( ! apd . require ( 'autocomplete-plus' ) )
168
- atom . packages . loadPackage ( 'autocomplete-plus' ) ;
169
- atom . packages . activatePackage ( 'linter' )
170
- . then ( function ( ) { return atom . packages . activatePackage ( 'autocomplete-plus' ) ; } )
171
- . then ( function ( ) { return waitForGrammarActivation ( ) ; } )
172
- . then ( function ( ) { return readyToActivate ( ) ; } ) ;
173
- } ) ;
174
- return ;
175
- }
176
- waitForGrammarActivation ( ) . then ( function ( ) { return readyToActivate ( ) ; } ) ;
153
+ require ( 'atom-package-deps' ) . install ( 'atom-typescript' ) . then ( waitForGrammarActivation ) . then ( readyToActivate ) ;
177
154
}
178
155
exports . activate = activate ;
179
156
function deactivate ( ) {
0 commit comments