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

not-yet

v1.0.7

Published

An angular library to add feature toggle functionality to your project/s and will toggle elements/components on or off based on a feature list provided.

Downloads

8

Readme

NotYet

An angular library to add feature toggle functionality to your project/s and will toggle elements/components on or off based on a feature list provided.

My Skills

This library was generated with Angular CLI version 15.0.0.

Installation :wrench:

npm install not-yet

The installation has a post install script which should create the file not-yet-features.json in the src/assets/ directory. This is because Angular already includes all files in the assets directory when building so no configuration is required to include the file. Confirm that the file is created in src/assets/, and if the file is missing after installation please add it or follow the instructions on how to use a custom file below.

:warning: Note: Please don't forget to import the module NotYetModule, in the appropriate module when using in an Angular project.

Usage :man_mechanic:

  1. Add the not-yet directive with the release version as a string, to the component/s or element/s that you wish to disable until a particular release.
<div *notYet="'19.9.2'" >
   <h2>The new feature</h2>
</div>
  1. Then when the feature needs to be accessed, add the version number/s in the list of 'featuresReleased' in the not-yet-features.json file.
 "featuresReleased": ["19.9.2", "19.9.3"]

Using a custom file (override) :toolbox:

You can specify a custom json file instead of the not-yet-features.json to store the list of features, either locally in the assest folder of the project or as a hosted file.

:warning: Note: The custom file must be a json file and must have the following format:

{
 "featuresReleased":[]
}

Override with a local json file :file_cabinet:

  1. Create a json file e.g features.json, make sure to place it somewhere in the assets folder. In the example below the file is placed in src/assets/configuration/ .
src
|-- app
|-- assets
        |-- configuration
                      |-- features.json
  1. Then you will need to provide a new value for the token NOT_YET_FILE_PATH in the app.module .
import { NOT_YET_FILE_PATH, NotYetModule } from 'not-yet';
providers: [
  {
    provide: NOT_YET_FILE_PATH,
    useValue: "./assets/configuration/features.json"
  }
],

Override with a hosted json file :cloud:

When using a hosted json file, all that needs to be done after making the file accessible, is to provide the address to the file. The example specifies a URL to a json file on GitHub.

import { NOT_YET_FILE_PATH, NotYetModule } from 'not-yet';
providers: [
    {
      provide: NOT_YET_FILE_PATH,
      useValue: "https://raw.githubusercontent.com/themegat/store/main/features.json"
    }
  ],

:warning: Note: Make sure that the file has the correct format specifiying the featuresReleased list.

Examples :desktop_computer:

If you need a live example, please visit: https://stackblitz.com/edit/github-pgpsgp?file=README.md