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

nyrewatch

v1.0.10

Published

## [![Release](https://github.com/rolandpeelen/rewatch/actions/workflows/build.yml/badge.svg?branch=master&event=release)](https://github.com/rolandpeelen/rewatch/actions/workflows/build.yml)

Downloads

112

Readme

Rewatch

Release

Info

Rewatch is an alternative build system for the Rescript Compiler (which uses a combination of Ninja, OCaml and a Node.js script). It strives to deliver consistent and faster builds in monorepo setups. Bsb doesn't support a watch-mode in a monorepo setup, and when setting up a watcher that runs a global incremental compile it's consistent but very inefficient and thus slow.

We couldn't find a way to improve this without re-architecting the whole build system. The benefit of having a specialized build system is that it's possible to completely tailor it to ReScript and not being dependent of the constraints of a generic build system like Ninja. This allowed us to have significant performance improvements even in non-monorepo setups (30% to 3x improvements reported).

Project Status

This project should be considered in beta status. We run it in production at Walnut. We're open to PR's and other contributions to make it 100% stable in the ReScript toolchain.

Usage

  1. Install the package
yarn add @rolandpeelen/rewatch
  1. Build / Clean / Watch
yarn rewatch build
yarn rewatch clean
yarn rewatch watch

You can pass in the folder as the second argument where the 'root' bsconfig.json lives. If you encounter a 'stale build error', either directly, or after a while, a clean may be needed to clean up some old compiler assets.

Full Options

Find this output by running yarn rewatch --help.

Rewatch is an alternative build system for the Rescript Compiler bsb (which uses Ninja internally). It strives to deliver consistent and faster builds in monorepo setups with multiple packages, where the default build system fails to pick up changed interfaces across multiple packages

Usage: rewatch [OPTIONS] [COMMAND] [FOLDER]

Arguments:
  [COMMAND]
          Possible values:
          - build: Build using Rewatch
          - watch: Build, then start a watcher
          - clean: Clean the build artifacts

  [FOLDER]
          The relative path to where the main bsconfig.json resides. IE - the root of your project

Options:
  -f, --filter <FILTER>
          Filter allows for a regex to be supplied which will filter the files to be compiled. For instance, to filter out test files for compilation while doing feature work

  -a, --after-build <AFTER_BUILD>
          This allows one to pass an additional command to the watcher, which allows it to run when finished. For instance, to play a sound when done compiling, or to run a test suite. NOTE - You may need to add '--color=always' to your subcommand in case you want to output colour as well

  -n, --no-timing <NO_TIMING>
          [possible values: true, false]

  -c, --create-sourcedirs <CREATE_SOURCEDIRS>
          This creates a source_dirs.json file at the root of the monorepo, which is needed when you want to use Reanalyze
          
          [possible values: true, false]

      --compiler-args <COMPILER_ARGS>
          This prints the compiler arguments. It expects the path to a rescript.json file. This also requires --bsc-path and --rescript-version to be present

      --rescript-version <RESCRIPT_VERSION>
          To be used in conjunction with compiler_args

      --bsc-path <BSC_PATH>
          A custom path to bsc

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

Contributing

Pre-requisites:

  • Rust
  • NodeJS - For running testscripts only
  • Yarn or Npm - Npm probably comes with your node installation
  1. cd testrepo && yarn (install dependencies for submodule)
  2. cargo run

Running tests:

  1. cargo build --release
  2. ./tests/suite.sh