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

rachelle

v0.11.2

Published

Fast, and lightweight TypeScript boilerplate that export a single file. Tests in Mocha & Chai. TSLint for better code quality.

Downloads

195

Readme

Rachelle

Build Status CircleCI Coverage Status codecov npm version npm downloads npm

Fast, compact and lightweight TypeScript 2.1 boilerplate that export a single file.

This boilerplate uses TypeScript 2.1 by default, and Rollup + Buble to bundle a flat production bundle.

Mocha + Chai are used as the testing stack. Unit tests can be run with or without JSDOM.

Estimated bundle time: 0.3 ms. (Depends on your computer.)

Features

  • [x] Statically typed build system for working with Typescript 2.0 Pre
  • [x] Consistent code style with TSLint.
  • [x] Coverage report with Istanbul
  • [x] Optional JSDOM
  • [x] Rollup for bundling
  • [x] Bublé as the ES2015 compiler
  • [x] Mocha & Chai de facto standard
  • [x] Environment variabels for production and development
  • [x] Easy debugging

Getting started

The only development dependency of this project is Node.js. So just make sure you have it installed. Then type few commands known to every Node developer...

git clone --depth 1 https://github.com/kflash/rachelle.git
cd rachelle
# install the project's dependencies
npm i

# bundle both a development and production bundle
npm build

... and boom! You have it all setup for you!

NPM

  • build - creates a development and production bundle
  • build:dev - creates a development bundle
  • build:prod - creates a production bundle
  • coverage - shows the coverage report
  • clean - remove the dist, coverage and build folders
  • clean:build - remove the build folder
  • test - run all unit tests in the node.js environment
  • test:jsdom - run all unit tests in the node.js environment with jsdom
  • lint - validates all source and test files
  • lint-src - validates all source files
  • lint-tests - validates all test files
  • release - build the library, push to NPM and Github
  • watch:tests - run all unit tests and watch files for changes
  • watch:build - watch your TypeScript files and trigger recompilation on changes
  • update:dependencies - update npm packages

Usage

You can simply use this project as a drop-in replacement for any TypeScript projects if you need something fast, and lightweight. Just replace the ./src and ./test folder and it should work right out of the box.

Use npm run build to bundle your source files. The TypeScript declarations for your bundle will be in the ./build/src folder.

Coverage reports

The coverage reports are generated with Istanbul, and delivered to coveralls.io and codecov by Travis CI.

Istanbul generate a 100% correct coverage report. See the source and test files and do a comparison.

FAQ

Can this boilerplate be used together with React?

Yes. Bublé supports JSX, and in fact React are now swapping out Browserify with Rollup. You can read more about it here - React - PR #7178.

How to use this boilerplate with Karma?

NPM install the Karma package and type karma init on the command line. The test files are pre-transpilled by TypeScript and located here build/test/specs/**/*.js. Install a Karma preprocessor, and the NPM packages you may need.

Is JSX supported?

Yes. Both TSX and JSX. By default Bublé are configured to be used with React. You may change this inside the rollup.config.js file.

Why is everything so strict?

What do you mean? The TypeScript compiler have it's rules to follow, as well as TSLint. Everytime you bundle, run a watch task or run the unit tests, things get validated. You can't compile the source code or run unit tests if there are errors in your code.

When should I consider using this boilerplate?

You may consider this is if you need a lightweight, fast boilerplate that export a single file.

What's the browser compatibility?

As a rule of thumb, TypeScript works best in IE9 and above.

Do I need to customize this boilerplate?

Nope. You only have to change the name on the boilerplate in the package.json.