New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

n2w

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n2w

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

  • 1.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

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 :)

FAQs

Package last updated on 28 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc