@@ -9,9 +9,11 @@ import {
9
9
DEFAULT_EXCLUDE_SEMI_COLON_AT_END_OF_LINE ,
10
10
DEFAULT_HEADER_COMMENT_TEMPLATE ,
11
11
DEFAULT_INSERT_FINAL_NEWLINE ,
12
+ DEFAULT_LICENSE ,
12
13
DEFAULT_MAINTAINER ,
13
14
DEFAULT_OWNER ,
14
15
DEFAULT_SKIP_FOLDER_CONFIRMATION ,
16
+ DEFAULT_VERSION ,
15
17
} from './constants.config' ;
16
18
17
19
/**
@@ -158,6 +160,30 @@ export class ExtensionConfig {
158
160
*/
159
161
maintainers : string ;
160
162
163
+ /**
164
+ * The license.
165
+ * @type {string }
166
+ * @public
167
+ * @memberof ExtensionConfig
168
+ * @example
169
+ * const config = new ExtensionConfig(workspace.getConfiguration());
170
+ * console.log(config.license);
171
+ * @default ''
172
+ */
173
+ license : string ;
174
+
175
+ /**
176
+ * The version.
177
+ * @type {string }
178
+ * @public
179
+ * @memberof ExtensionConfig
180
+ * @example
181
+ * const config = new ExtensionConfig(workspace.getConfiguration());
182
+ * console.log(config.version);
183
+ * @default ''
184
+ */
185
+ version : string ;
186
+
161
187
// -----------------------------------------------------------------
162
188
// Constructor
163
189
// -----------------------------------------------------------------
@@ -202,6 +228,8 @@ export class ExtensionConfig {
202
228
'project.maintainers' ,
203
229
DEFAULT_MAINTAINER ,
204
230
) ;
231
+ this . license = config . get < string > ( 'project.license' , DEFAULT_LICENSE ) ;
232
+ this . version = config . get < string > ( 'project.version' , DEFAULT_VERSION ) ;
205
233
}
206
234
207
235
// -----------------------------------------------------------------
@@ -248,6 +276,11 @@ export class ExtensionConfig {
248
276
) ;
249
277
this . author = config . get < string > ( 'project.author' , this . author ) ;
250
278
this . owner = config . get < string > ( 'project.owner' , this . owner ) ;
251
- this . maintainers = config . get < string > ( 'project.maintainers' , this . maintainers ) ;
279
+ this . maintainers = config . get < string > (
280
+ 'project.maintainers' ,
281
+ this . maintainers ,
282
+ ) ;
283
+ this . license = config . get < string > ( 'project.license' , this . license ) ;
284
+ this . version = config . get < string > ( 'project.version' , this . version ) ;
252
285
}
253
286
}
0 commit comments