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

palestra-potiday-js-libs

v0.1.0

Published

Essa lib vai ser apresentada no evento do potiday-js

Downloads

2

Readme

PalestraPotidayJsLibs

This lib was created with the npx @andersonsmed/create-js-lib command.

Following is a list with all the basic info that you might want know about.

Before start coding

The entry point for your lib is the src/index.js file, so you can update it as your will.

This lib comes with ESLint and Prettier configured so you can have static validation and enforced code style by default. You can change it's configurations at any time by changing the .eslintrc.json and .prettierrc files.

Also, this lib comes with some git hooks installed by default, managed by Husky. They will be useful to running some validations just before a new commit is created.

How to sync with a remote repository

These steps must be done only once after the lib is created

During the setup, a git init command is executed just after the lib is created.

So, in order to sync your lib with a remote repository, you just need to run the following commands in your terminal:

The repository_url should be replaced by a URL that looks like [email protected]:user/repository.git

git add .
git commit -m "Initial project"
git branch -M main
git remote add origin repository_url
git push -u origin main

Releasing a new version

This lib uses semantic versioning to handle versioning. So, in order to publishing your changes, you'll need to create a version incrementing the lib with all the changes.

To make it more clear, let's mock it up.

Lets say that the version of your lib is 0.0.1 and you want to release a new PATCH. So, following the semantic versioning guidelines the next released version should be 0.0.2.

Now, in order to increase the version field of the package.json, automatically create a new git tag for this version, and publish it to the registry you can use the following commands in your terminal:

npm version 0.0.2
git push --follow-tags
npm publish

It's worth mentioning that the npm publish command might fail due to an authentication failure. If that happen, you can run a npm login command and your terminal, log in with your npm registry credentials, and then run only the npm publish command again.

Command reference

This lib comes with some useful scripts in the package.json file. Following is a table describing them:

| Script | Description | |-------------------|-------------------------------------------------------------------------------------------------------------| | lint | Runs ESLint to search for linting errors in the ./src directory. | | lint:fix | Runs ESLint with the --fix flag to automatically fix linting errors in the ./src directory. | | test | Echoes the message "no test found". This script is a placeholder and doesn't run any actual tests. | | prepublishOnly | Runs the build script before publishing the lib to a registry. | | build | Creates a production build of the lib inside the /lib directory. | | dev | Creates a development build of the lib in watch mode and runs npm link to test it locally. |

References