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

n2w

v1.4.0

Published

This project implements functionality of [angular-cli](https://github.com/angular/angular-cli) but with [open configurations](#configuration-extending).

Downloads

6

Readme

Ng2Webpack [n2w]

This project implements functionality of angular-cli but with open configurations.

An Angular 2 bundler system (cli) featuring latest Angular 2, Karma, Protractor, Jasmine, TypeScript, @types, TSLint, Codelyzer, Hot Module Replacement, and Webpack 2.

This project serves as an Angular 2 bundler system as replacement of angular-cli (due to beta stage of angular-cli) for anyone looking to get up and running with Angular 2 and TypeScript fast. Using a Webpack 2 for building our files and assisting with boilerplate. We're also using Protractor for our end-to-end story and Karma for our unit tests.

Project supports

  1. build process
  2. karma tests
  3. protractor tests
  4. lazy routes
  5. chunks
  6. npm linked packages

Quick Start

To start working with project simply do next:

  1. Add n2w as dependency into package.json
  2. Copy scripts into package.json
{
  "scripts": {
    "start": "n2w serve",
    "build": "n2w build",
    "test": "n2w test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "n2w e2e",
    "lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check"
  }
}
  1. Remove standard karma configuration and protractor configuration files
  2. Keep angular-cli.json, project reuses it

Supported options

Standard options

  • --env or --environment - see angular-cli env options
npm run bundler -- --env=prod
  • --prod or --production - for production builds
npm run bundler -- --prod
  • --port - dev server port, default port is 4200
  • --host - dev server host, default host is localhost
  • --live-reload-port - port for live reloading, default the same as --port
  • --live-reload-host - specify host for live reloading, default the same as --host

Configuration extending

  • --conf - link to the module, which can extend webpack configuration
  • --karma-conf - link to the module, which can extend karma configuration
  • --protractor-conf - link to the module, which can extend protractor configuration
  • --server-conf - link to the module, which can extend dev server configuration Note: Each module should return function to extend configuration and should return extended configuration, e.g.:
module.exports = function (config) {
  //extend config here
  return config
}

Examples

  1. develop
npm start
  1. build
npm run build
  1. test
npm test
  1. e2e
npm run e2e

License

MIT :)