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

node-bptemplate

v2.1.8

Published

A basic template that follows best practices for building new Node projects.

Downloads

411

Readme

node-bptemplate

node-bptemplate is a basic template designed for beginners to streamline the creation of new Node.js projects. It provides a simple way to set up a project with a predefined structure and configuration, following best practices.

Features

  • A command-line interface (CLI) for creating a new project from a template.
  • Includes a customizable template folder to kickstart your project.
  • Easy to integrate with existing Node.js projects.

Installation

To install the package globally on your system, use npm:

npm install -g node-bptemplate

Usage

After installing the package, you can use the create-template command to copy the contents of the templates folder into your desired directory.

create-template <destination-directory>
  • <destination-directory>: The path where the template will be copied. If not specified, the current directory (.) will be used.

Example

To create a new project in a directory named my-new-project, run:

create-template my-new-project

This will copy the contents of the templates folder into the my-new-project directory.

Project Structure (Template) for Users

When you run the create-template command, the following project structure will be generated:

project-root/
│
├── controllers/
│   └── routeController.js
│
├── middlewares/
│   └── middleware.js  // Common error handling to speed up the process
│
├── models/
│   └── exampleSchema.js
│
├── routes/
│   └── routeEx.js
│
├── tests/
│   └── newFile.test.js
│
├── utils/
│   ├── config.js
│   └── logger.js  // Logging functions for error and info
│
├── .env
├── app.js
├── index.js
├── package.json

Project Structure(For Contributing)

Here is an overview of the project structure:

  • bin/: Contains the CLI entry point (cli.js).
  • lib/: Contains the logic for copying the template (createSkeleton.js).
  • templates/: The folder whose contents will be copied to the destination directory.
  • package.json: Defines the project’s metadata, dependencies, and scripts.
  • Dependencies used : fs-extra helped in creating, copying, and manipulating files and directories when Creating new projects with the template.

Development

Setup

  1. Clone the repository:
git clone https://github.com/DevKanmi/npm-Package-expressTemplate.git
  1. Navigate to the project directory:
cd npm-Package-expressTemplate
  1. Install dependencies:
npm install

Testing Locally

To test the package locally:

Link the package globally:

npm link

Use the create-template command to test:

create-template <destination-directory>

Making Changes

  1. Create a new branch for your changes:

git checkout -b feature/your-feature-name
  1. Make your changes to the codebase.

  2. Commit your changes:

git add .
git commit -m "Add a concise message describing your changes"
  1. Push your branch to the repository:

git push origin feature/your-feature-name
  1. Open a Pull Request (PR) on GitHub:

  • Go to the repository on GitHub.
  • Click on "Compare & pull request".
  • Provide a clear description of your changes and submit the PR

Contributing

We welcome contributions to the project! Please follow these guidelines:

  • Fork the repository and work on a new branch for each feature or bug fix.
  • Write clear and concise commit messages.
  • Ensure all tests pass by Testing it Locally before submitting a pull request.
  • Follow the Code of Conduct and Contributing Guidelines.

License

This project is licensed under the ISC License.

This `README.md` includes a detailed section for contributors, covering how to set up the development environment, make changes, and submit pull requests. Let me know if you need any additional details!