Skip to content

Commit

Permalink
FIX Expose localisations (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Oct 5, 2023
1 parent 8994a2f commit 2b5c170
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
},
"extra": {
"expose": [
"client/dist"
"client/dist",
"client/lang"
]
},
"minimum-stability": "dev",
"prefer-stable": true
}
}
1 change: 1 addition & 0 deletions src/Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function getThumbnail(): string
*/
public function applyRequirements(): void
{
Requirements::add_i18n_javascript('silverstripe/webauthn-authenticator: client/lang');
Requirements::javascript('silverstripe/webauthn-authenticator: client/dist/js/bundle.js');
Requirements::css('silverstripe/webauthn-authenticator: client/dist/styles/bundle.css');
}
Expand Down
2 changes: 1 addition & 1 deletion tests/MethodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function testApplyRequirements()
$method = new Method();
$method->applyRequirements();

$this->assertCount(1, Requirements::backend()->getJavascript());
$this->assertcount(2, Requirements::backend()->getJavascript());
$this->assertCount(1, Requirements::backend()->getCSS());
}

Expand Down

0 comments on commit 2b5c170

Please sign in to comment.