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

fs-javascript-starter

v1.2.4

Published

A javascript starter project by Firefly Semantics Corporation

Downloads

214

Readme

Firefly Semantics Javascript Starter Project

This is a baseline Javascript starter project that extends the Firefly Semantics Github Flow Starter Project.

It makes collaborating with, building, testing, documenting, and releasing / publishing Javascript ES2021 project modules simple.

The Github Flow Starter Project that it is based on provides documents that are commonly used in Github Flow open source projects and includes:

The Github Flow Starter Project is setup to make following the Conventional Commits Specification for adding human and machine readable meaning to commit messages easy.

Following the Conventional Commits Specification encourages proper use of the Semantic Versioning Specification and also enables automatic generation of the projects changelog (CHANGELOG.md).

In addition to the capabilities added by the Github Flow Starter Project, this projects adds:

  • Typescript ES2021 Module Build
  • Central index.ts Module API Entry Point
  • Testing with @web/test-runner
  • JSDoc Documentation
  • Rollup Module Bundling
  • Module Declaration Properties in package.json

Get Started

To get started first clone or download the current release of this project.

Clone the Github Repository

git clone [email protected]:fireflysemantics/fs-javascript-starter.git

Setup

Install dependencies by cding into the root of the project and running npm i && npm run init.

cd fs-javascript-starter
npm i && npm run init

The npm run init script will install jsdoc globally, making it easier to run the command.

Run the default tests. If you get a message like this:

Looks like Playwright Test or Playwright was just installed or updated ...

Then run the script npm run playwright-init. This will download the browsers needed by playwright.

Lint the Project

To run eslint on the project:

npm run lint:eslint

Or

npm run lint

Build the Project

npm run build

To clean the build directory run:

npm run clean:build

To clean the entire project (Both the build directory and the doc directory) run:

npm run clean

Test the Project

npm run test

JSDoc the Project

npm run doc

To clean the doc directory run:

npm run clean:doc

To serve the jsdoc locally run:

npm run serve:doc

Deploy the docs to Github Pages with:

git subtree push --prefix doc origin gh-pages

This a link to the gist for the git subtree command.

To see the generated typedoc for this project click on this link.

Create a Rollup Module

npm run rollup

For more see rollup.

If the project is published NPM the index.bundle.js can be load from the UNPKG CDN via the URL https://unpkg.com/[package name]. So for example the URL for this projects index.bundle.js module is https://unpkg.com/fs-javascript-starter.

Here is a Stackblitz demo of this bundle loaded..

Publish the Project

npm run npm:pub

The release-it configuration in package.json sets publish to NPM to false, but it's also possible to use release-it to perform the publishing.

Unpublish the Project

npm run npm:unpub

Demo the Project

This will serve the index.html file located in the demo directory using @web/dev-server. The server resolves node style "bare" import specifiers, so there are no additional build steps.

npm run serve

Here is a link to the documentation for @web/dev-server.

Release the Project

Run release-it to perform a release.

npm run release

Review Project Commits

git log

Delete 2 Commits

git reset --hard HEAD~2

For more on deleting and cleaning up commit history this SO Post.

Keeping the commit history "Clean" and "Flowing" is creates a better experience for reviewers intersted in learning more about the project by running git log.