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-application-template

v1.2.4

Published

provides a configured application template for you to build upon

Downloads

632

Readme

Dynamic JSON Badge Dynamic JSON Badge Static Badge

Create Application Template

This project aims to provide a configured application template for you to build upon.

All configuration is fully visable and under your control to augment as you see fit.

The template is a typescript enabled React application with a test suite and code linting.

See the template running live here.

installation

first install globally

npm install -g create-application-template

then create your project

npx create-application-template --name={my-project}

usage

webpack is used for code bundling and the development server

run development server and test suite (on http://localhost:3333 by default)

npm run dev

build static bundle

npm run build

tsconfig

focused on type checking; babel is used for transpiling

pre-commit

scripts in .husky/pre-commit are run on commits for quality control

add or remove scripts you'd like run before code is commited

test suite

to create a test follow this file naming format: *.{spec,test}.{ts,tsx}

run the test suite stand alone like so

npm run test

code linting

linting rules are in .eslintrc.js; install the ESLint pluggin if using vscode

npm run lint

css linting rules are in .stylelintrc.js; install the Stylelint pluggin if using vscode

npm run stylelint

styles

styling is done using the style-components module, but straight CSS is supported

after instillation it is recommended to proceed using styled-components or CSS, but not both

if you proceed with styled-components:

  • remove the single .css example in /src/styles/
  • that's it!

if you prefer CSS:

  • alter .stylintrc.js and .husky/pre-commint per the files' notes
  • remove .ts files from /src/styles/ or "recreate" them in .css

environmental settings

access environmental variables in code like so

console.log(process.env.PORT)

NODE_ENV settings

automatically set to production for build; develop for dev server

.env variables

add new or alter existing environmental variables via the .env file

the following variables exist in the default configuration and can be altered

develop (dev server)

# optional
PORT={port number}
INLINE_SIZE_LIMIT={default is 10000}

production (build)

# optional
INLINE_SIZE_LIMIT={default is 10000}