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

encore-loader

v1.1.1

Published

#### Methods ``` - loadCSS(string) - loadJS(string) ```

Downloads

2,690

Readme

Loader_fe

Methods

- loadCSS(string)
- loadJS(string)

Usage

- loadCSS('https://img.tfd.com/all.css')
     .then(() => {...})
     .catch(() => {...})

Setup steps

- Run `git config core.hooksPath .githooks` to configure git hooks
- Run `npm i` to install dependencies

Dev dependencies

node: >= 10.10.0,
npm: >= 6.4.1

Code Analysis Tools

We use some open source tools to perform static code analysis:

  • TSLint
  • Stylelint

These tools are automated and doesn't require manual work once they've been set up. They are also integrated in our continuous integration process.

TSLint

Linting is a process of checking the source code for stylistic as well as programmatic errors. TSLint helps to identify some mistakes that are made during coding. It is also used for adhering best practices and improving code quality and readability.

Our TypeScript code is written in compliance with recommended style guide. It is a set of standards that outline how code should be written and organized and it covers nearly every aspect of TypeScript. We use TSLint with recommended config.

You can run TSLint manually with the following command: npm run lint:ts.

Setup your IDE/Editor to show you TSLint errors and warnings:

WebStorm
  1. Go to File ➤ Settings / Default Settings ➤ Languages and Frameworks ➤ TypeScript ➤ TSLint
  2. Click "Enable" checkbox
  3. Select Node interpreter
  4. Specify path to tslint package which is inside the project's node_modules folder.
VSCode
  1. Go to: View -> Extension or press CTRL + SHIFT + X
  2. Search for "TSLint" extension, click it and press "Install" button
  3. Press "Reload" button or reopen the editor

Stylelint

Stylelint is a linter that helps to avoid errors and enforce conventions in styles. It understands the latest CSS syntax, parses SCSS, extracts embedded styles from HTML, markdown and CSS-in-JS template literals.

It is used with "stylelint-config-standard" which extends recommended Stylelint config and turns on additional rules to enforce the common stylistic conventions found within a handful of CSS styleguides, including: The Idiomatic CSS Principles, Google's CSS Style Guide and Airbnb's Styleguide.

You can run Stylelint manually with the following command: npm run lint:css.

The setup process for your IDE is similar to TSLint. I'm sure you'll figure it out.