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

@j.u.p.iter/jupiter-scripts

v1.17.0

Published

Handy-dandy scripts ;)

Downloads

12

Readme

Jupiter Scripts

Handy dandy scripts, I use in all my own packages. It allows you not to setup all build, transpile and compile tools again and adain and again. To build, publish, run CI, tests and etc. you should just install this package and run one of many scripts it allows you to run.

Description

  • We build this package with tsc
  • All options we pass to jupiter-scripts bin, like --watch and etc. we retranslate - repass to bin we call, using jupiter-scripts: build, lint, test. So: jupiter-scripts build --bundle --watch command will pass --watch option to rollup bin. And the result command will be: rollup --watch

How to work with this package

Install it

yarn add @j.u.p.iter/jupiter-scripts

Point out scripts

In scripts section of your package.json file you should point out all necessary scripts you want to run with this package. Example of such section you can find in one my packages. For example, here: https://github.com/j-u-p-iter/react-hooks/blob/master/package.json#L17-L24

Create start boilerplate for your package.

Write start boilerplate code for your package. Code of all my packages has one common structure (describe structure of package in separate .md file of this package).

Run start script (https://github.com/j-u-p-iter/jupiter-scripts/issues/25)

Run start script. This script will listen all your changes and rebuild result bundle on each your change. My advice - to look at the terminal, where you run this script from time to time. You can find here some run time issues - you need to fix, before move further. It's always great to have habbit - to check this terminal from time to time.

Setup testing environment

Create file for your future specs and do all necessary testing environment setups. We respect TDD and we prefer to write code in form of TDD.

Run test script

Terminal with this script in running mode will be one more indicator, that we're on right way towards our goal.

Check all indicators from time to time

Terminal windows with running start and test scripts are great indicators, that everything is going well. But as soon as you detacted any issues there. You should stop further development and fix these issues at first. Never continue developing, when you have issues to fix. At first you should fix them and after that go further.

You work is done, when you wrote everything you've planned and your tests are green and have 100% test coverage. Package won't be published on CI if:

  • you have lint issues
  • your build is broken
  • your tests fail
  • all your tests pass, but you have less than 100% test coverage

Run lint:fix after you finish work with package

This will allow your to fix most lint issues you currently have automatically. Some of these issues can't be fixed automatically. You will be notified about this cases in terminal, where you run lint:fix. You should fix these issues manually.

Run commit script

Now you can add your changes and commit them. We commit all changes also with script. You'll see some prompt you should pass before your commit will be created.

Configure https://travis-ci.com

  • You should give travis-ci.com knowledge about your repo. This way travis-ci.com will start listening changes in your master branch and start ci as soon as changes in master branch appears.
  • In settings section for your new repo you should add GH_TOKEN, NPM_TOKEN. It's necessary to pass authentication on Github and npm.

Push your changes to master branch

You finish with your package. You can push them into master branch. By default we run CI only if changes appear in master branch. You can configure this stuff in .travis.yml (one of the file, that sits in boilerplate code), but in most cases master branch is the only branch you need and you don't need to do these changes.

Control CI

Wait untill CI pass of fails. If it fails - do necessary changes and push them to master branch again.

And that's it. After your code pass CI - your package will be published on npm automatically.