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

generator-website-starter

v1.0.9

Published

A website generator using semantic markup, SASS, Gulp, Imagemin and Browser-sync

Downloads

274

Readme

generator-website-starter

This project is about learning how to build an npm package file using website starter files created in my previous repo and generate it using yeoman tool.

How to use this package

If you want to use this generator, below are the steps.

  1. Install yeoman globally if you haven't installed it before npm install -g yo

  2. Install your created generator globally if you haven't installed it before npm install -g generator-website-starter

  3. Install the package file using Yeoman. You can repeat this process if you want to reuse in a new VS Workspsace yo website-starter

  4. Run gulp in your project directory terminal

    If error occur its possible that gulp is not installed in your global yet. Below are steps to install

    • Run gulp command utility npm install --global gulp-cli
    • Install Gulp in your project directory npm install --save-dev gulp

    For more details on how the generated files are created, please read this repository

Steps in creating a yeoman generator

If you want to learn how I created this generator, below are the steps

  1. Create a new repository in github

  2. Open a blank VS Code Workspace

  3. File structure of yeoman generator

   .
   ├── generator-`generator-name` # File folder has to start with `generator` followed by a dash then your generator name
   │ │ ├── generators
   │ │ │ │ ├── app # Index.js and package files are stored that Yeoman uses to generate
   │ │ │ │ │ │ ├── templates # Package files saved in this folder are generated by Yeoman. Copy files in this folder, alternatively, use `git submodule add 'link of repository'` to load another git repository as a sub folder in the main repository. > Note: If there was a change in original repository, the files in this folder needs to be updated manually
   │ │ ├── index.js #

How to update a git submodule: Go back to root generator folder and run this git submodule foreach git pull

  1. Install Yeoman in your project folder npm install --save yeoman-generator

  2. In index.js, import yeoman generator and write script files where you need to copy files that are shown in the supposedly generated package file from templates folder. Credits to Coder Coder's for the script.

  3. Test the package locally by running this npm link and expect a confirmation message that a package is added.

    Note: Best to test it in a new blank VS Code Workspace by running an npm init then npm install and lastly npm link "name-of-your-generator-folder" and expect to see the package installed.

  4. Login to your npm account. Sign up here if you don't have one yet.

    Note: email address used in sign up is public knowledge.

Error encountered

npm notice Account creation via legacy auth is unavailable. Please set your auth-type to "web" or visit https://www.npmjs.com/signup to create an account.
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/-/user/org.couchdb.user:NAME
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/NAME/.npm/_logs/2023-04-29T12_54_51_911Z-debug-0.log

It somehow resolved by doing the following:

  • Added 2FA in my npm account
  • Linked my github account in my npm account
  • I typed the wrong username

Update package files

  1. Push and commit files to github repository

  2. Update yeoman version number in package.json npm version 1.1.1

  3. Update npm package files npm publish

  4. Check udpated files in your npm account

Credits