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

search-ui

v0.1.2

Published

Search UI for TST

Downloads

6

Readme

Search UI

This is a purely Front End project ( only static files ).

The only dependencies you need is NodeJS and Gulp installed.

NodeJS: https://nodejs.org/en/download/

Gulp: npm install -g gulp


To Get Started:

  • Check out the repo locally
  • run npm install inside the directory. (You only have to do this once)

Running the project:

Inside the directory run:

gulp

There are several options when using gulp, to list them, run:

gulp --help

Running with Remote API:

You can point the API requests at client-test enviroment by using the following flag:

gulp --remote

or shorthand:

gulp -r

Running with Local API:

By default the project runs pointing at your local API: https://amatravel.localhost

You can point the front end to use any API url you like by using the following:

gulp --api http://amatravel.localhost

Which will point all API requests at the specified url.


Running with certain Feature Toggles enabled:

By default the project runs using the feature settings specified in config/features.js

If you would like to override one of the feature toggles at runtime, you can enable features by doing:

gulp --features sponsoredListings,feature2,feature3

or shorthand:

gulp -f sponsoredListings,feature2,feature3

!~! WARNING !~! Features must be comma seperated, and no spaces between them.


Generating the Docs:

Gulp can automatically generate JS/HTML doc files from the source code. This is useful for when you want to read through some source code in a annotated and user friendly way.

We currently use docker.js for this, you can learn more here: docker.js docs

To generate and view the docs, run:

gulp docs

This will generate docs for any .js or .html file in the app/ directory. After docs are generated it will automatically open a tab with the generated docs. Any subsequent changes to .js or .html files will auto regenerate the associated doc file and refresh the browser, showing the updated doc.


Disabling the proxy:

The project runs with NodeJS proxying all API requests to the desired api url.

You can disable the proxy and point the front end directly at the api url by running:

gulp --dontproxy

or shorthand:

gulp -d

Building the project:

To build the project, which puts all built files into dist/ run the following:

gulp build

This will:

  • minify all javascript files
  • optimize all image files
  • minify css files
  • remove all console.log in the code

Running with locally linked common and styleguide repo's:

By default NPM downloads common and styleguide as normal npm packages.

If you would like to work on something in common or styleguide and see the results instantly inside of search-ui you need to locally link the NPM projects.

To do so, download both common and styleguide repo's locally. In each directory run:

npm link

This will give you an output similar to:

/usr/local/lib/node_modules/styleguide -> /Users/qrpike/tst/styleguide

We only need the 2nd part. Go into the search-ui directory and run the following:

npm link /Users/qrpike/tst/styleguide

Now NPM symlinks the npm package to your local copy so all changes are instantly seen inside of search-ui project. You need to do this for both common and styleguide repos.


More details and documents to come...