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

create-web-config

v1.0.10

Published

A CLI to help you get started building modern web applications.

Downloads

21

Readme

-----------------------------------------------------

➤ Usage

To create a new app you run the following command.

$ npm init web-config new <dir>

This command will create a project from scratch for you with sweet features as for example SCSS imports, Karma testing, live reloading, coping resources, chunking, treeshaking, Typescript, license extraction, filesize visualizer, JSON import, budgets, build progress, minifying, compression with brotli and gzip and much more.

That's it! Behind the curtains, the library web-config is used.

-----------------------------------------------------

➤ Configuration

The below table shows how to configure the new command.

Usage: new [options] <dir>

Setup a new project from scratch.

Options:
  --dry            Runs the command without writing any files.
  --lit            Adds lit-element and various webapp related libraries to the setup.
  --no-install     Doesn't install node_modules.
  --sw             Adds a service worker to the setup.
  --src <string>   Name of the folder with the transpiled output (default: "src")
  --dist <string>  Name of the folder with the source code (default: "dist")
  -h, --help       output usage information

-----------------------------------------------------

➤ Example

Below are two examples on how to use the command. The commands will both create a project in a folder called "my-project". The first one will create a simple configuration while the other will configure the project to use lit-element.

$ npm init web-config new my-project
$ npm init web-config new my-project --lit

-----------------------------------------------------

➤ Overview

Here's an overview of the files that are generated for you.

| File | Description | |----------------------------------|--------------------------------------------------| | .browserslistrc | Specifies which browsers are supported by your build. | | .gitignore | Files ignored when adding files to git. | | karma.conf.js | Configuration for the testing setup with karma. | | package.json | Specifies dependencies and other information about your project. | | README.md | Gives an introduction to your project. | | rollup.config.ts | Rollup configuration for the build. | | tsconfig.json | Configuration for Typescript. | | .eslintrc.json | Configuration for how your files should be linted. | | .eslintignore | Configuration for which files should be ignored by the linter. | | typings.d.ts | Additional typings for Typescript. | | src/index.html | Entry HTML for your webapp. | | src/main.ts | Entry JS for your webapp. | | src/main.scss | Styles loaded and appended to the document. | | src/robots.txt | Specifies how crawlers should handle your site. | | src/assets/manifest.json | Web manifest. | | src/pages/home-element.ts | Element for the home page. | | src/pages/home-element.scss | SCSS for the home element. | | src/pages/home-element.test.ts | Tests for the home element. |

-----------------------------------------------------

➤ 100/100 Lighthouse score

If you add a service worker by running the $ npm init web-config new my-project --sw command you'll get to enjoy a 100/100 Lighthouse score from the beginning.

-----------------------------------------------------

➤ Local installation

You can also install the library locally and use the CLI you can run the following command.

$ npm i create-web-config

Then you would use the CLI like this.

$ web-config new my-project

-----------------------------------------------------

➤ Contributors

| | |:--------------------------------------------------:| | Andreas Mehlsen |

-----------------------------------------------------

➤ License

Licensed under MIT.