Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #71 from mobilejazz/feature/ngx-cache-busting
Browse files Browse the repository at this point in the history
Add `ngx-transalte` cache busting tip + other improvements
  • Loading branch information
doup authored Nov 6, 2020
2 parents a270df5 + 0aca8c0 commit e4b8ac1
Show file tree
Hide file tree
Showing 28 changed files with 4,904 additions and 4,451 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Harmony Reference

test

## Contributing to the documentation

- The documentation is located the [`docs` folder](docs)
- New contributions should follow GitFlow: create a `feature/*` branch, merge it to `develop` and finally merge it to `master``
- You don't need to know anything about Docusaurus, and you don't need to run the project locally to update the documentation.
- New contributions should follow GitFlow: create a `feature/*` branch, merge it to `develop` and finally merge it to `master`
- You don't need to know anything about [Docusaurus](https://v2.docusaurus.io), and you don't need to run the project locally to update the documentation.

### Adding a new page

Expand All @@ -26,7 +24,7 @@ title: Executor

## Development

This website is built using [Docusaurus 2](https://v2.docusaurus.io/).
This website is built using [Docusaurus 2](https://v2.docusaurus.io).

### Initial Setup

Expand All @@ -38,7 +36,7 @@ This website is built using [Docusaurus 2](https://v2.docusaurus.io/).
### Development Server

- Run: `npm start`
- This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
- This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

Expand Down
13 changes: 13 additions & 0 deletions bin/lint-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,19 @@ function linkExists(file, link) {
function validateLinks(file, content) {
const links = markdownLinkExtractor(content).filter(link => !link.includes('http'));
const errors = [];
const imageExts = ['.gif', '.jpg', '.jpeg', '.png', '.webp'];

links.forEach(link => {
const extension = extname(link);
const hasExtension = extension !== '';
const hasPagesPrefix = /^\/?pages\//.test(link);
const linkDoesNotExist = !linkExists(file, link);
const isImage = imageExts.includes(extension);

// Ignore image links
if (isImage) {
return;
}

if (hasExtension) {
errors.push(`Remove "${colors.red(link)}" link "${extension}" extension.`);
Expand All @@ -95,8 +102,14 @@ function validateLinks(file, content) {

function validateFile(file) {
const content = readFileSync(file, 'utf-8');
const ignoreExts = ['.gif', '.jpg', '.jpeg', '.png', '.webp'];
const ext = extname(file);
let errors = [];

if (ignoreExts.includes(ext)) {
return { file, errors };
}

const validators = [
validateLowerCase,
validateExtension,
Expand Down
4 changes: 2 additions & 2 deletions docs/best-practices/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs defaultValue="mobile-jazz" values={[
{ label: 'Mobile Jazz', value: 'mobile-jazz', },
{ label: 'Mobile Jazz', value: 'mobile-jazz', },
{ label: 'Android', value: 'android', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', }
]}>

Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/common/mapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A `Mapper` defines a function to map a value from a type to another type.
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down
4 changes: 2 additions & 2 deletions docs/fundamentals/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Within the domain layer, there are 3 major concepts:
- [Models](domain/model)
- [Threading](domain/threading)

For example, while building a NestJS Restful API the domain would be coupled with multiple Typescript libraries, but wouldn't be using any NestJS package.
For example, while building a NestJS Restful API the domain would be coupled with multiple TypeScript libraries, but wouldn't be using any NestJS package.

Typically, in the domain layer we would find a big list of interactors (use cases) and model objects that combined provide the functionality defined in the specification.

Expand All @@ -51,7 +51,7 @@ The data layer is divided in sub-layers:

- [Repository](data/repository/repository)
- [Data Source](data/data-source/data-source)
- [Entity]
- [Entity](data/entity)

For example, the data layer could implement an HTTP client or a database storage, providing fetch / save / delete capabilities from the different data sources.

2 changes: 1 addition & 1 deletion docs/fundamentals/data/data-source/data-source-mapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import TabItem from '@theme/TabItem';
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down
6 changes: 3 additions & 3 deletions docs/fundamentals/data/data-source/data-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Find below the interfaces for each data source group:
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down Expand Up @@ -129,7 +129,7 @@ Some examples:
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down Expand Up @@ -191,7 +191,7 @@ Also, there is only one delete method (no `deleteAll`) as it is considered an at
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import TabItem from '@theme/TabItem';
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down
8 changes: 4 additions & 4 deletions docs/fundamentals/data/data-source/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The base definition of a query is empty, as this object must be customized in cu
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down Expand Up @@ -52,7 +52,7 @@ For example, if one or many data sources can perform a serch by text, we would d
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down Expand Up @@ -149,7 +149,7 @@ In an effort to build a friendly key-value ecosystem for data sources, Harmony d
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down Expand Up @@ -220,7 +220,7 @@ Coming back to the `SearchQuery` example, we could now make it adopt `KeyQuery`,
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down
6 changes: 3 additions & 3 deletions docs/fundamentals/data/entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For example, an entity would be something like:
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand All @@ -41,13 +41,13 @@ struct UserEntity {
<TabItem value="typescript">

```typescript
export class User {
export class UserEntity {
constructor(
readonly id: number,
readonly createdAt: Date,
readonly updatedAt: Date,
readonly name: string,
) {}
) {}
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/fundamentals/data/repository/operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The base definition of an operation is empty, as this object must be customized
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', }
]}>
<TabItem value="kotlin">
Expand Down Expand Up @@ -50,7 +50,7 @@ For example, if repositories want recover from a data source failure N times, we
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', }
]}>
<TabItem value="kotlin">
Expand Down
6 changes: 3 additions & 3 deletions docs/fundamentals/data/repository/repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The `Repository` functions replicate the [`DataSource`](/docs/fundamentals/data/
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', }
]}>
<TabItem value="kotlin">
Expand Down Expand Up @@ -142,7 +142,7 @@ Actions related functions.
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', }
]}>
<TabItem value="kotlin">
Expand Down Expand Up @@ -195,7 +195,7 @@ Deletion related functions.
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', }
]}>
<TabItem value="kotlin">
Expand Down
12 changes: 6 additions & 6 deletions docs/fundamentals/domain/interactor.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For example, we could have an interactor that returns the current time:
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
]}>
<TabItem value="kotlin">

Expand Down Expand Up @@ -62,7 +62,7 @@ For example, we could have an interactor that returns the time between now and a
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
]}>
<TabItem value="kotlin">

Expand Down Expand Up @@ -121,7 +121,7 @@ Default interators have one method called `execute` (in Kotlin, it is using the
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
]}>
<TabItem value="kotlin">

Expand Down Expand Up @@ -153,7 +153,7 @@ Default interators have one method called `execute` (in Kotlin, it is using the
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
]}>
<TabItem value="kotlin">

Expand Down Expand Up @@ -185,7 +185,7 @@ Default interators have one method called `execute` (in Kotlin, it is using the
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
]}>
<TabItem value="kotlin">

Expand Down Expand Up @@ -231,7 +231,7 @@ It is recomended to **compose default interactors** instead of having direct ref
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
]}>
<TabItem value="kotlin">

Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/domain/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Typically, a model would be something like:
<Tabs defaultValue="kotlin" values={[
{ label: 'Kotlin', value: 'kotlin', },
{ label: 'Swift', value: 'swift', },
{ label: 'Typescript', value: 'typescript', },
{ label: 'TypeScript', value: 'typescript', },
{ label: 'PHP', value: 'php', },
]}>
<TabItem value="kotlin">
Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/domain/threading.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Furthermore, as each language has its own threading tools, there is no actual re
</LinkCard>
<LinkCard
href="fundamentals/domain/threading/typescript"
title="Typescript"
title="TypeScript"
description=""
footer="View">
</LinkCard>
Expand Down
2 changes: 1 addition & 1 deletion docs/fundamentals/domain/threading/typescript.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
title: Typescript
title: TypeScript
---
2 changes: 1 addition & 1 deletion docs/getting-started/samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ https://github.com/mobilejazz/harmony-php/tree/master/sample
1. Configure server with `localhost` name and `localhost` host.
2. See `/docker/docker-compose.yml` to know the volumes for each folder.

## Typescript
## TypeScript

Under development

Expand Down
Loading

0 comments on commit e4b8ac1

Please sign in to comment.