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

@bhc/js-imesure

v1.3.0

Published

[comment]: <> (modifie this, do not remove) <!-- [![Actions Status](https://github.com/{owner}/{repo}/workflows/{workflow_name}/badge.svg)](https://github.com/{owner}/{repo}/actions) --> [![Actions Status](https://github.com/BHC-IT/ts-tools/workflows/Node

Downloads

19

Readme

Actions Status Actions Status

Project tree

 WASM
├── addon //contain .cpp & .h files
│   ├── base.cpp -> base() function
│   ├── base.h -> export base() to global scope
│   └── index.cpp -> expose base() function for nodejs via napi
├── bindings //contain .ts file that wrap from cpp
│   └── base.ts -> wrap base addon for as a ts module
├── scripts // scripts to use the project
│   ├── build.sh -> build the cpp files of the project
│   ├── createDocker.sh -> create docker image of the project
│   ├── runDocker.sh -> create container based on current image
│   ├── runTestDocker.sh -> create container of a test image and destroy it after used
│   └── testDocker.sh -> create test image
├── src // source file for the project in .ts
│   └── index.ts -> entry point of the bundle
├── test // unitary test
│   ├── base.cpp.test.ts -> test for base() funtion
│   └── index.test.ts -> test of the entrypoint
├── typings // type test file
│   ├── globals
│   │   └── mocha
│   │       ├── index.d.ts
│   │       └── typings.json
│   ├── index.d.ts
│   └── modules
│       └── chai
│           ├── index.d.ts
│           └── typings.json
├── binding.gyp -> configuration file for node-gyp
├── Dockerfile -> docker configuration file used for creating the project image
├── Dockerfile.test -> docker configuration file used for creating the test image
├── nodemon.json -> configuration file for nodemon
├── package.json -> configuration file for npm
├── README.md
├── tsconfig.json -> configuration file for typescript
└── typings.json -> configuration file for typing

Command

npm start: run the project in prod mode

npm run dev: run the project in dev mode with nodemon

npm run build: build the project. run ./scripts/build.sh

npm run clean: clear the project. delete dist && build path

npm run test: launch unary test

npm run docker: create a docker image of the project. same as npm run docker:build. run ./scripts/createDocker.sh

npm run docker:start: launch a docker container based on the current version image if it exist run ./scripts/runDocker.sh

npm run docker:test: create a docker image for unite testing purpose. create a self destructing attached container of the image. run ./scripts/testDocker.sh and ./scripts/runTestDocker.sh

Dependecies

npm install -g typings chai mocha ts-node node-gyp

lets break that down:

`typing & chain & mocka` : unitary tests

`ts-node`: compile typescript code

`node-gyp`: compile C++ code

How to use

First clone this repo and copy/move its content in another project folder

git clone https://github.com/BHC-IT/node-cpp-template.git
mkdir NEW_PROJECT
cp -rf node-cpp-template/* NEW_PROJECT/.

then link the folder to your remote repository

cd NEW_PROJECT
git init
git commit -m "first commit"
git remote add origin [email protected]:AUTHOR_NAME/REPO_NAME.git
git push -u origin master

You are now good to go with this template