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

webpack-ts-seed

v1.4.4

Published

Webpack Typescript Seed project

Downloads

6

Readme

React Webpack Typescript Seed project

Seed project building React apps with Typescript

What you need to do to start working

git clone https://github.com/slizlaszlo/webpack-ts-seed.git
cd webpack-ts-seed
npm i
npm run start

Note: (maybe) you will need to install the typedoc package globally for documentation generation:

npm i -g typedoc

Currently it works fine if you clone the repo from Github.

I'm working on the command line install script.

Important!

Please follow the Conventional Commits rules when contributing!

Main modules used in the seed

Webpack Dev server setup

Create a copy of the .env.example, rename it to .env and set the HOST in the file to your preference. (Note: wrong domain can cause issues in the browser during the API requests.) The webpack-dev-server loads the .env a file and uses the HOST and HTTPS values from it. This file added to the gitignore, so it won't be pushed to the repo. It should look like this:

HOST = "your.preferred.domain"
HTTPS = true

This extra configuration isn't required, it's just an option.

CLI scripts for build, run, test

Use these in your CLI to build or run the project:

npm run +

  • start to start the webpack development server and start watching the source files
  • build to start watching the source files without webpack dev server
  • dev to create a development build
  • prod to create a production build
  • test to run all registered unit tests
  • tslint run tslint from CLI
  • gen-cov generate code coverage report
  • open-cov open the generated coverage report in chrome
  • cov generate and than open the code coverage report in chrome
  • validate run the test and tslint scripts
  • gen-doc run the typedoc document generator
  • open-doc open the generated document
  • doc run the typedoc document generator and open the generated document
  • release update the CHANGELOG.md based on the commit messages

Linting

The webpack using the tslint-loader which checks the ts source files for linting issues and will block the compilation if it founds an error.

Testing

Test web application

You can create a test application in the sdk/test folder and when zou run the npm run build command all of those will be copied into the dist folder also.

Unit test

Jest integrated into the project: create test files next to the module files with an extra test notation, e.g.: name.test.ts and than run the npm test or npm t script.

Run npm run test-watch to enable watch mode for jest.

Code coverage

Generated by Jest, it uses Instanbul reporter under the hood. Coverage treshold can be set in the jest.config.js, currently it is set to 50%.

Commenting

Convention

Automated changelog generation is applied to the project, please create your commit message as the convention needs it!

Comments should be structured like this:

<type>[optional scope]: <description>

[optional body]

[optional footer]

Linting

Commitlint is used to check if the commit message follows the convention, the commit will fail if the linter founds an error.

Ghooks

Git hooks used to check the commit with TSLint and Commitlint and blocks the commit if either linting fails.

Style

Autoprefixing

No need to write vendor prefixes in CSS/SCSS files because the build tool chain uses postcss loader and autoprefixer to give the prefixes autimatically during compile time.

Linting

The project configured to use the Stylelint webpack plugin to lint the SCSS files.