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

team-zeus-frontend

v4.1.2

Published

team zeus app - frontend

Downloads

7

Readme

TeamZeus Frontend

Prerequisites

You need to have Node.js server and with npm (node package manager) version 3 and above. You can just install new stable version of Node.js(^5) that came with new version of npm(^3).

Installation

npm i - install modules

Development

npm run dev - run development mode

npm run dev nolint - run in development mode without eslint

When you run development mode, new window of your default browser will open with this app at localhost:PORT, if you want to disable this behavior just add .env file with DISABLE_OPEN=true in root folder.

You can use NODE_ENV variable inside of your Javascript code to access actual enviroment value (the NODE_ENV var is processed by Webpack). Possible values are production, development and test for Karma tests.

Testing

Unit testing:

We are using Karma for testing in real browsers together with Mocha and Chai assertations. When writing tests, create new file with .spec.js sufix in the same folder your tested file is located. You can run tests in different or multiple enviromets by using karma browsers flag, posible options are: Chrome, Firefox, PhantomJS, IE. Default browser is Chrome. See package.json for more information.

npm run test - run karma tests once in default browser

npm run test-general -- --brosers=Chrome,PhantomJS - run karma tests once in Chrome & PhantomJS

npm run test-watch - run tests in watch mode in default browser, handy for fixing or developing tests

npm run test-watch-general -- --browsers=IE - run tests in watch mode in Internet Explorer

End 2 End testing:

  • We are using Nightwatch.js (http://nightwatchjs.org/) as a superstructure of Selenium Web Driver, with own implementation of PageObjects (written in ES6).
  • Tests are located in ./test/e2e/.
  • By default all tests run in parallel, if you like to change that just modify "test_workers" property of ./test/nightwatch.json.
Running E2E Tests

To run E2E tests you need to start the app first: npm run dev or npm run serve-dist.

You can choose specific browser using Nightwatch.js env flag, posible options are: chrome, firefox, phantomjs, ie.

npm run e2e - run e2e tests in default enviroment (Chrome)

npm run e2e -- --env=firefox - run e2e tests in Firefox

Automated Testing

We are using BrowserStack for both Unit and E2E testing, to determine specific OS & browser to run, put BrowserStack's config object (located in ./test/BrowserStacEnvs.all.json, you can get updated version with curl -u "teamzeus1:WwGtng523aziPuKn9Njw" https://www.browserstack.com/automate/browsers.json or visit List of all envs) into ./test/BrowserStacEnvs.json. Then you can simply run:

npm run browserstack-unit - runs Unit tests on BrowserStack

npm run browserstack-e2e - runs E2E test on BrowserStack

Build

npm run build - run build script

Build script bundles and compresses all js, html templates, css and small images(as BASE64). Then copyies all necessary files into ./dist folder. For production simply copy contents of distribution folder into your server root direcotry.

npm run porod-server - run server with production assets from ./dist folder, this is mostly for testing purposes.

Deploy

npm run deploy - deploys distribution file to staging env

Coding Stuff

Use "ngInject"; in the begginging of each angular controller function that uses dependency injection pattern. Otherwise uglified production code wont work. This declaration automatically injects all dependencies with $inject Property Annotation - ng-annotate(-loader) will take care of that.

IDE Configuration

When developing the application and working with Webpack HMR, note that solution is refreshed after each change so you might want to disable save files automatically feature or similar functionality in order to have a control over the actual reaload.

If you are using WebStorm please disable Smart indent feature in settings(indents automatically whole file including template html)

Troubleshooting

When things go wrong, you can try:

Remove node_modules folder rm -rf node_modules and reinstall all modules npm i

Clear npm cache npm cache clear

If none of steps above resolve your problem, please contact [email protected]