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

asset-database_utils

v3.4.3

Published

This repository contains some tools for the Consilio platform, to help with the calculation and conversion of field values.

Downloads

4

Readme

SPG Drycooling utils

This repository contains some tools for the Consilio platform, to help with the calculation and conversion of field values.

Repository structure

The different tools can be found in the packages directory.

Each package is a separate distributable set of tools with individual version and dependencies.

To add a new package, simply create a new root-level folder in the packages directory and add a package.json and README.md. Source files should be stored in the lib folder, the index.ts file will be automatically generated on build.

Build tools

The root package.json exposes 3 scripts:

| Name | CMD | Description | | ---- | --- | ----------- | | lint | yarn lint <package> | Lint a package with eslint | | test | yarn test <package> | Test a package with jest | | build | yarn build <package> | Build a package |

Linting

You can find the eslint configuration in the .eslintrc.js file in the root of the repository.

You can lint a specific package by providing its name:

yarn lint field-services

If you want to lint all packages, you can omit the package argument:

yarn lint

Testing

You can find the jest configuration in the jest.config.js file in the root of the repository.

You can test a specific package by providing its name:

yarn test field-services

If you want to test all packages, you can omit the package argument:

yarn test

If you want to watch the tests, add the --watchAll flag:

yarn test field-services --watchAll

yarn test --watchAll

Build

The build script executes several steps:

  1. Clear the dist folder and set up folders for the build targets.
  2. Build the index.ts file (using named-exports).
  3. Create webpack builds (by default for umd and commonjs targets).
  4. Build the package.json file (from the root as well as the package package.json files).
  5. Copy the README.md to the dist folder.
  6. Set permissions for executables (if any are present).

The build command takes 4 arguments:

yarn build <package> --cwd path/to/src --dist path/to/output --types
  • package: name of the package you want to build, can passed as the first argument or by using the --package flag (shorthand -p).
  • cwd: src folder to build (when using package this is set automatically to packages/<package>).
  • dist: output folder for builds (when omitted defaults to dist)
  • types: copy type declaration files to the dist folder (webpack already outputs declaration files to the dist folder so in most cases this is no longer needed).

Publishing a new version

To publish a new version, make sure you follow these steps:

  • bump the version in the package.json of the package you updated
    • follow semver rules: patch for fixes, minor for features, major for breaking changes
  • commit your new version using the build prefix
    • build(<package>): <version>, e.g. build(field-services): v2.1.1
  • tag your new version
  • make a new build so the version is updated in the dist as well
    • yarn build <package>, e.g. yarn build field-services
  • publish your new version
    • cd dist/<package> && yarn publish, e.g. cd dist/field-services && yarn publish