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

@paddls/schematics

v0.0.0-rc.3

Published

Schematics for Paddls libraries

Downloads

8

Readme

Schematics

build npm version GitHub GitHub repo size GitHub last commit GitHub issues GitHub top language

Summary

Informations

    This schematics will be used to initialize an Angular project by installing the '@paddls' dependencies from npm. It will also create the '@core', '@shared' and '@system' folders in their parent folder 'module'.
    After the folders created, it will also create the module.ts file for each one, thanks to templates (core.module.ts for @core, shared.module.ts for shared, system.module.ts for system).

    If you want to import firebase in your project, the configuration of firebase will be in your environment.ts file, and you will have to fill your values instead of the TODO strings.
    Finally, you could choose to insert in your app.module.ts file the NgxHttpRepositoryModule and NgxFirestoreRepositoryModule depending on if you need firebase or HTTP or both.

    You can choose to run independently each task or can run all in once.

How to Install

All you have to do is to install the schematics in your project. You have 2 methods.

NPM :

npm install @paddls/schematics

or

Angular Cli :

ng add @paddls/schematics

With the Angular Cli solution, it will execute automatically all the tasks described below

Get Started

Installing the @paddls libraries

To install the @paddls libraries in your project you have to run

ng generate @paddls/schematics:add-paddls

It will ask you which version of the library you want to install, or it will install the latest version compatible depending on your Angular/RXJS version.

| @paddls libraries | Description | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------| | @paddls/ngx-common | Common functions to use in your Angular project | | @paddls/ngx-firestore-repository @paddls/ngx-http-repository @paddls/ngx-repository | Easily create a strongly typed data access layer | | @paddls/rxjs-common | Helpful operators to use with RXJS | | @paddls/ngx-serializer | Angular Wrapper of ts-serializer | | @paddls/ts-serializer | Serialize/Deserialize JSON into typescript objects with decorators |

Once installed, you could use the paddls libraries in your Angular project.

Create modules folders

To create the @core, @shared and @system folders, you have to run

ng generate @paddls/schematics:add-modules

It will ask you which folders you want to create in your Angular project.

Create modules files

To create the core.module.ts, shared.module.ts and system.module.ts files, you have to run

ng generate @paddls/schematics:add-modules-files

Once executed, you will choose which file you want to create, it will be created in their respective folder. The files will be created thanks to templates included in this schematic.

Replace the environment.ts

If you want to include your firebase configuration in your project, you have to run

ng generate @paddls/schematics:replace-environment

You will see this added in your environment.ts file

firebase: {
        apiKey: 'TODO',
        authDomain: 'TODO',
        databaseURL: 'TODO',
        projectId: 'TODO',
        storageBucket: 'TODO',
        messagingSenderId: 'TODO',
        appId: 'TODO',
        measurementId: 'TODO'
    }

All you have to do is to replace the TODO fields by your values to connect to your firebase project

Replace the app.module.ts

If you want to include the firebase, HTTP, and NgxRepository Modules in your app.module.ts and the providers to make firebase work, you have to run this schematic

ng generate @paddls/schematics:replace-app-module-file

It will ask you if you want to import the modules necessary for firebase and/or HTTP.

Execute all tasks

To execute all the tasks, you simply have to run

ng generate @paddls/schematics:ng-add

or, same as Angular Cli method showed above

ng add @paddls/schematics