Skip to content

Commit b6c69ac

Browse files
author
benholloway
committed
fixed external tools for windows
1 parent 49d6acf commit b6c69ac

File tree

2 files changed

+14
-126
lines changed

2 files changed

+14
-126
lines changed

templates/idea/tools/Angularity.xml

Lines changed: 0 additions & 74 deletions
This file was deleted.

templates/webStorm.js

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ var path = require('path');
44

55
var ideTemplate = require('ide-template');
66

7-
var webStorm = {};
8-
97
/**
108
* Using the generator's ./templates/idea/fileTemplates/<javascriptTarget>
119
* recursively copy the file templates to the local user's webstorm preferences folder.
@@ -60,65 +58,29 @@ function angularityToolNode(parameters) {
6058
showConsoleOnStdOut: 'false',
6159
showConsoleOnStdErr: 'false',
6260
synchronizeAfterRun: 'true',
63-
exec : angularityExecParam(parameters),
64-
filter : [
65-
{
61+
exec : [ {
62+
name : 'COMMAND',
63+
value: 'angularity.cmd'
64+
}, {
65+
name : 'PARAMETERS',
66+
value: parameters
67+
}, {
68+
name : 'WORKING_DIRECTORY',
69+
value: '$ProjectFileDir$'
70+
} ],
71+
filter : [ {
6672
name : 'NAME',
6773
value: 'File'
68-
},
69-
{
74+
}, {
7075
name : 'DESCRIPTION',
7176
value: 'Match the standard console output to make error messages clickable.'
72-
},
73-
{
77+
}, {
7478
name : 'REGEXP',
7579
value: '$FILE_PATH$\\:$LINE$\\:$COLUMN$'
76-
}
77-
]
80+
} ]
7881
};
7982
}
8083

81-
/**
82-
* Determine the correct path values for the External Tools based on the OS.
83-
* Unix can use the global angularity alias, windows is given absolute paths to the binaries.
84-
* @param parameters
85-
* @returns {*}
86-
*/
87-
function angularityExecParam(parameters) {
88-
89-
if (ideTemplate.util.platform === 'windows') {
90-
return [
91-
{
92-
name : 'COMMAND',
93-
value: 'C:\\Program Files\\nodejs\\node.exe'
94-
},
95-
{
96-
name : 'PARAMETERS',
97-
value: '&quot;' + path.resolve(__dirname, '..', '..', '..', 'bin', 'cli.js') + '&quot; ' + parameters
98-
},
99-
{
100-
name : 'WORKING_DIRECTORY',
101-
value: '$ProjectFileDir$'
102-
}
103-
];
104-
} else {
105-
return [
106-
{
107-
name : 'COMMAND',
108-
value: 'angularity'
109-
},
110-
{
111-
name : 'PARAMETERS',
112-
value: parameters
113-
},
114-
{
115-
name : 'WORKING_DIRECTORY',
116-
value: '$ProjectFileDir$'
117-
}
118-
];
119-
}
120-
}
121-
12284
module.exports = {
12385
generateAngularityWebStormTools: generateAngularityWebStormTools,
12486
copyFileTemplates : copyFileTemplates

0 commit comments

Comments
 (0)