npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lessify/angular-tools

v17.3.2

Published

Angular command line tool to facilitate application development and build.

Downloads

709

Readme

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

| Name | Description | Default value | |--------------------|--------------------------------------------------------|---------------------| | Local | | | | cwd | The current working directory in which to search. | "./src/app" | | languages | Project languages. | ["en"] | | output | Output 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.

| Key | en | de | |----------------|----------|------------| | login.email | Email | Email | | login.password | Password | Passwort | | login.submit | Submit | Einreichen |

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.

| Parameter | Alias | Description | |-----------|-------|---------------------------------------------| | host | h | Firebase host where API is deployed. | | space | s | Space 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.

| Parameter | Alias | Description | |-----------|-------|---------------------------------------------| | host | h | Firebase host where API is deployed. | | space | s | Space 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.

| Name | Description | Default value | |--------|----------------------------------------------------------------|-----------------------------| | path | Where to save the environment variables | "./src/environments/env.ts" | | prefix | Environment 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