17.3.2 • Published 10 days ago

@lessify/angular-tools v17.3.2

Weekly downloads
2
License
MIT
Repository
github
Last release
10 days ago

Lessify Angular Tools

Angular command line tool to facilitate application development and build.

npm npm npm npm

Install

npm i -D @lessify/angular-tools

Usage

In root fo your Angular project you can run ng generate @lessify/angular-tools:<command> or alias ng g @lessify/angular-tools:<command> where <commands> are list of commands enumerated below. Example : ng generate @lessify/angular-tools:i18n-merge or alias ng g @lessify/angular-tools:i18n-merge

Configuration

Configuration File

Tool Configuration file should be located in project root with name lessify.json.

Where we have two sections :

  • Local - all configuration related to local project
NameDescriptionDefault value
Local
cwdThe current working directory in which to search."./src/app"
languagesProject languages."en"
outputOutput folder path that will contain all merged value."./src/assets/i18n"
{
  "cwd": "./src/app",
  "output": "./src/assets/i18n",
  "languages": ["en"]
}

i18n Local Commands

i18n-check

ng g @lessify/angular-tools:i18n-check

Check i18n integrity.

  • duplicated keys
  • number of keys in each language.

i18n-merge

ng g @lessify/angular-tools:i18n-merge

Merge i18n JSON files in one. For example you have three languages, then you will have three files as output (one per language).

i18n-export-csv

ng g @lessify/angular-tools:i18n-export-csv

Export all translations in one CSV file.

Keyende
login.emailEmailEmail
login.passwordPasswordPasswort
login.submitSubmitEinreichen

i18n-import-csv

ng g @lessify/angular-tools:i18n-import-csv

Import one CSV file into all i18n.

Localess Cloud Commands

Integration with Localess application deployd in Firebase.

Proxy will be automatically filled from NPM configurations.

i18n-localess-diff

ng g @lessify/angular-tools:i18n-localess-diff

It will compare values from Localess cloud and your local project.

Cloud fields host and space are mandatory.

ParameterAliasDescription
hosthFirebase host where API is deployed.
spacesSpace ID, you can find it in Spaces section

i18n-localess-sync

ng g @lessify/angular-tools:i18n-localess-sync

It will copy values from Localess cloud and will update them in your local project.

Cloud fields host and space are mandatory.

ParameterAliasDescription
hosthFirebase host where API is deployed.
spacesSpace ID, you can find it in Spaces section

Environment Commands

set-env

ng g @lessify/angular-tools:set-env

Read Environment Variables at build time, and store them in a TypeScript file.

NameDescriptionDefault value
pathWhere to save the environment variables"./src/environments/env.ts"
prefixEnvironment variable prefix key, used to keep ony requred one.

Example of output file

export const env = {
  "LESS_ENV": "dev",
  "LESS_NAME": "LESSIFY"
};

Testing

In your project, link the @lessify/angular-tools we just built:

npm link $PATH_TO_SCHEMATIC_PROJECT

Replace $PATH_TO_SCHEMATIC_PROJECT with the path to the @lessify/angular-tools project’s root. Note that users will install instead of linking, this is just to iterate faster locally while developing. Once your schematic project is linked, you can use ng generate to call your schematics:

ng g @lessify/angular-tools:i18n-merge

17.3.0

10 days ago

17.3.2

10 days ago

17.3.1

10 days ago

15.0.0

4 months ago

17.0.0

4 months ago

16.0.0

4 months ago

14.0.0

1 year ago

14.0.1

1 year ago

14.0.2

1 year ago

13.2.21

2 years ago

13.2.20

2 years ago

13.2.8

2 years ago

13.2.9

2 years ago

13.3.5

2 years ago

13.2.6

2 years ago

13.2.7

2 years ago

13.3.3

2 years ago

13.2.4

2 years ago

13.3.4

2 years ago

13.2.5

2 years ago

13.3.1

2 years ago

13.2.2

2 years ago

13.3.2

2 years ago

13.2.3

2 years ago

13.2.0

2 years ago

13.3.0

2 years ago

13.2.1

2 years ago

13.2.10

2 years ago

13.2.13

2 years ago

13.2.12

2 years ago

13.1.3

2 years ago

13.1.1

2 years ago

13.1.2

2 years ago

13.1.0

2 years ago

12.0.0

2 years ago

13.0.0

2 years ago

11.0.0

2 years ago

10.0.1

2 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago