File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ function resolveConfig(config: Config): Context {
5555 const ctx : Context = {
5656 ...config ,
5757 pkgUser : pkg ,
58+ xpiName : dash ( config . name ) ,
5859 version : pkg . version ,
5960 hooks : createHooks ( ) ,
6061 templateDate : data ,
Original file line number Diff line number Diff line change @@ -40,6 +40,6 @@ export abstract class Base {
4040 return this . ctx . updateURL ;
4141 }
4242 get xpiName ( ) {
43- return this . ctx . build . define . xpiName ;
43+ return this . ctx . xpiName ;
4444 }
4545}
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ export default class Build extends Base {
233233 max = manifest . applications ?. zotero ?. strict_max_version ;
234234
235235 const updateHash = generateHashSync (
236- path . join ( this . dist , `${ this . ctx . templateDate . xpiName } .xpi` ) ,
236+ path . join ( this . dist , `${ this . xpiName } .xpi` ) ,
237237 "sha512" ,
238238 ) ;
239239
@@ -278,7 +278,7 @@ export default class Build extends Base {
278278 await webext . cmd . build ( {
279279 sourceDir : `${ this . dist } /addon` ,
280280 artifactsDir : this . dist ,
281- filename : `${ this . ctx . templateDate . xpiName } .xpi` ,
281+ filename : `${ this . xpiName } .xpi` ,
282282 overwriteDest : true ,
283283 } ) ;
284284 }
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ interface UserConfig extends RecursivePartial<Config> {
2121
2222interface Context extends Config {
2323 pkgUser : any ;
24+ xpiName : string ;
2425 version : string ;
2526 hooks : Hookable < Hooks > ;
2627 templateDate : { [ placeholder : string ] : string } ;
You can’t perform that action at this time.
0 commit comments