Skip to content

Commit

Permalink
Merge pull request #114 from mreiche/feature/au2
Browse files Browse the repository at this point in the history
Feature/au2
  • Loading branch information
martingrossmann authored Jun 21, 2024
2 parents db0251a + e9cd95b commit b6424e1
Show file tree
Hide file tree
Showing 70 changed files with 793 additions and 11,914 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4

[{*.yml,*.yaml}]
indent_size = 2
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
31 changes: 12 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![npm](https://img.shields.io/npm/v/t-systems-aurelia-components)

Common useful components for the Aurelia Framework (https://aurelia.io)
Common useful components for the Aurelia 2 Framework (https://docs.aurelia.io/)

## Documentation

Expand All @@ -23,36 +23,30 @@ npm install t-systems-aurelia-components --save

## Use in your Aurelia project

Since this library doesn't provide any precompiled `dist/` files, you need to reference the source code in your project.
Since this library doesn't provide any precompiled `dist/` files, you need to reference the source code `main.ts` like.

### Aurelia features
Open `main.ts`
```typescript
aurelia.use
.globalResources([
PLATFORM.moduleName('t-systems-aurelia-components/src/value-converters/date-format-value-converter'),
])
```
import {NumberValueConverter} from "../../t-systems-aurelia-components/src/value-converters/number-value-converter";

### Direct imports
```typescript
import {CacheService} from "t-systems-aurelia-components/src/service/cache-service";
Aurelia
// ...
.register(NumberValueConverter)
// ...
```

## Locale related features

Some extensions like `date-format-value-converter` or `currency-value-converter` support localization. To change their internal locale, use the `aurelia-i18n` library.
Some extensions like `date-format-value-converter` or `currency-value-converter` support localization. To change their internal locale, use the `@aurelia/i18n` library.

```typescript
import {I18N} from 'aurelia-i18n';
import {autoinject} from 'aurelia-framework';
import {I18N} from '@aurelia/i18n';
import {resolve} from 'aurelia';

@autoinject()
export class App {
constructor(
private readonly _i18n:I18N
i18n = resolve(I18N)
) {
this._i18n.setLocale("en");
i18n.setLocale("en");
}
}
```
Expand Down Expand Up @@ -104,7 +98,6 @@ Run jest tests with
```shell
npm test
```
If tests are finished an HTML report is opened automatically.
## References
* Build and publish: https://medium.com/cameron-nokes/the-30-second-guide-to-publishing-a-typescript-package-to-npm-89d93ff7bccd
Expand Down
203 changes: 0 additions & 203 deletions jest.config.ts

This file was deleted.

Loading

0 comments on commit b6424e1

Please sign in to comment.