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

tlcodegen

v3.1.12

Published

Welcome to The Lumery's Code Generator! This tool will generate starting files for you to build upon and compile to be able to put into vendor platforms.

Downloads

11

Readme

Introduction

Welcome to The Lumery's Code Generator! This tool will generate starting files for you to build upon and compile to be able to put into vendor platforms.

Getting Started

To setup your environment for code generation you must:

1. Install Bun

Open Visual Studio Code, open the Terminal window. Using your VS Code Terminal, install Bun globally.

Powershell: powershell -c "irm bun.sh/install.ps1|iex"

NPM: npm install -g bun

2. Install TLCodeGen

In terminal type: bun add tlcodegen

3. Install dependant packages

In terminal type: bun install

Using the project

TLCodeGen Menu

This function will display a list of built in functions: bun tlcodegen

Initialise project

This function creates the folder and files that are relevant for the project.

To initialise a project: bun tlcodegen init-project

This function creates the following:

  • .gitignore file
  • Updates the cgconfig file with the chosen platform
  • Foundations directory and base branding SASS files
  • Copies platform specific templates to foundations directory

Generating campaign

This function creates the folder and files for an individual campaign.

To generate a campaign: bun tlcodegen generate-campaign

This will ask you for the:

  • Campaign code (i.e the JIRA task code - EXP123)
  • Number of variants - including the control variant.

Adding Variant

This function adds a new variant into the selected campaign.

To add a new variant: bun tlcodegen add-variant

This will ask you for the:

  • Campaign code (i.e. the JIRA task code - EXP123)

The function counts the number of variant folders, and then adds a new variant using the next alpha char. It requires the variant sequence to remain unbroken. As such, if you have previously deleted an variant it will error. For example, if you previously had four variants (A,B,C,D) and then deleted 'C' - this function will try and add a 'D' variant again.

Duplicating Variant

This function duplicates an existing variant into a new campaign.

To duplicate an variant: bun tlcodegen duplicate-variant

This will ask you for the:

  • Existing Campaign code (i.e. the JIRA task code - EXP123)
  • New campaign code (i.e. the JIRA task code - EXP124)

This function copies all existing files into new campaign. It runs a search and replace over the code, replacing the old code with the new.

Building\Running campaign

This function will compile & watch the Typescript and SASS files. It will also host those files (in localhost:3000).

To generate a campaign: bun tlcodegen dev

This will ask you for the:

  • Campaign code (i.e the JIRA task code - EXP123)
  • Variant - The specific variant you are working on.

This will only compile the specific variant you are working on.

Unit Testing campaign/variant

Setting up TamperMonkey

Install the "TamperMonkey" Chrome browser extension.

Create a new TamperMonkey script:

  • Copy and paste following code into editor
// ==UserScript==
// @name         {{CLIENT - NAME}} Dev Environment
// @namespace    http://thelumery.com/
// @version      0.1
// @description  The Lumery | {{CLIENT - NAME}} Dev Environment
// @author       The Lumery
// @match        {{CLIENT - URL PATTERN}}
// @icon         {{CLIENT - FAVICON URL}}
// @grant        GM_log
// ==/UserScript==

(function() {
    'use strict';

    const scriptTag = document.createElement('script');
    const styleSheet = document.createElement('link');

    scriptTag.setAttribute(
        'src',
        'http://localhost:3000/script.js',
    );

    styleSheet.setAttribute('rel', 'stylesheet');
    styleSheet.setAttribute('href', 'http://localhost:3000/style.css');

    document.head.append(scriptTag)
    document.head.append(styleSheet)
})();
  • Update {{CLIENT}} Variables

  • Type Ctrl + S