Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@purtuga/project-generate

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@purtuga/project-generate

Add private custom generators to any project

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

project-generate

An easy way to add custom generators to your project.

Yeoman is great, but normally you need to have your generators packaged and installed as npm packages. This is usually not optimal for private projects or for generators that are project specific and not really reusable. This project uses Yeoman's generator functionally to enable the ability to create project specific generators which are store along with the Project.

Install

npm i @purtuga/project-generate

Usage

Installation will make available a script named project-generate under the node_modules/.bin/ directory. Add the following generate script to your package.json under the scripts section so that you can run the generators using the npm run command:

{
    "scripts": {
        "generate": "project-generate"
    }
}

Now, just run npm run generate.

Generators

This utility looks for generators stored in directory named generators. This utility will look at the following locations in search of this directory:

  • The current directory
  • The root of the current project (determined by the closest package.json file)
  • User's home directory
  • This library's directory (picks up out-of-box generators)

Each generator is stored in a directory - the directory name is used as the generator name.

This tool provides some default generators which are opinionated to how I currently create projects. They are:

  • project: Create a new project that is based on my own project-base library
  • generator: Create a new generator (in your project's generators directory)

generator Usage

This generator will scaffold out the structure for a new generator. It will prompt for the name and will output all files to the current project (determined by closest package.json file) under a directory named generators. If not running under a project, the files will be output to the current folder (cwd).

License

MIT

Keywords

FAQs

Package last updated on 23 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc