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

mx-template-generator

v1.1.9

Published

react script helpers

Downloads

1,485

Readme

mx-template-generator

NPM package that you can use to create your own template files

how to install

npm i mx-template-generator -global

#how to setup

  1. create config file
  • mx-template-generator supports nested folder structure
    • your config.js file can support multiple templates
      • NOTE: if --template is not given it will default to template
      module.exports = {
        template: {},
        template2: {},
        template3: {}
      }
    • scheme for folder :
      {
        name: '<FOLDER>',
        type: 'folder',
        files: []
      }
    • scheme for file:
      {
        name: '<FILENAME>',
        type: 'file',
        location: '<PATH OF THE FILE LOCATION FROM THE TEMPLATES>'
      }
  • lib/templates/config.js Screen Shot 2022-06-24 at 11 29 27 AM]
  1. File Creation
  • ${fileName} will be replaced by the filename supplied from the command --name Screen Shot 2022-06-22 at 7 48 42 AM
  1. set the destination path of config
  • locate settings.json inside the npm package
  • change it to the location the config.js is located Screen Shot 2022-06-22 at 7 46 57 AM

#how to use

  1. open terminal or cmd
  2. locate the directory where you want to create your files
  • example: cd /Volumes/Passport/projects/sample-redux-toolkit/sampleApp/src/feature
  1. write mx-template-generator --name="ADD YOUR FILENAME HERE"
  2. npm package will automatically create the files from the config.js provided
  3. the name of the folder will have the first letter in lowercase
  • example: --name="SampleFolder" foldername will be sampleFolder

Commands

  • mx-template-generate
    • used to execute the file creation
  • --name
    • used to define the name, folder and class name
  • --template
    • used to specify the template to use
  • --force
    • used to override file creation
  • --debug
    • this will display console log messages
  • --config
    • this will set the path of the config file given
    • NOTE:

      • this is only intended for local node project install not global
      • this will locate the root node project path and append the config path given

Others

feel free to message me here on https://github.com/moribaleta/ if there are any other concerns create an issue ticket