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

generator-ng-ts

v0.3.1

Published

A Yeoman generator for Angular 1.x TypeScript projects.

Downloads

10

Readme

generator-ng-ts Build Status

A Yeoman generator for Angular 1.x TypeScript projects.

Features

  • Creates a complete Angular/TypeScript project setup. Including a gulpfile that is able to maintain a standard tsconfig.json file for maxiumum editor compatibilty. There is no gulpfile TypeScript compiler magic involved! The gulp build task simply calls your installed TypeScript compiler which automatically picks up the setup in the tsconfig.json file.

  • Supports Angular sub-generators. So far directives, controllers and modules are covered.

  • It is server framework agnostic. That is, it just creates static HTML, JavaScript and CSS files in a sub-directory of your choice (e.g. public or wwwroot). Thus you can use the generator to in combination with a Node.JS or ASP.NET 5 backend.

  • Adheres to established community guidelines. That is, the structure and coding aims for compatibilty with John Papa's excellent Angular styleguide.

  • Adopts some of the infrastructure components of John Papa's HotTowel generator, but tries to avoid the template-throw-away-code.

Currently Missing Features

Features for future releases:

  • Complete minification flow (including vendor components)
  • LESS support
  • Item templates & gulp tasks for (unit) testing

Getting Started

Installation

npm install -g tsd
npm install -g [email protected]
npm install -g bower
npm install -g yo
npm install -g generator-ng-ts

You need to install tsd, bower and typescript as globals since the ng-ts generator toolchain relies on it.

Scaffold an App

mkdir app
cd app
yo ng-ts

Result:

+---.settings                              editor settings VS Code
\---wwwroot                                static web root
    +---app                                angular app root
    |   +---blocks                         infrastructure components
    |   |   +---exception
    |   |   +---log
    |   |   \---router
    |   +---core                           routing and core app config
    |   \---home                           the home module
    +---styles                             CSS
    +---typings                            TypeScript typings
    |   +---angularjs
    |   [... more typings ...]
    \---vendor                             3rd party components (via bower)
        +---angular
        [... vendor components ...]

Scaffold a Module

cd wwwroot/app
mkdir widgets
cd widgets
yo ng-ts:module

Creates a file widgets.module.ts.

Scaffolding is conventional. The name of the module will be derived automaticall via inspecting your subfolder hierarchy.

Scaffold a Directive

yo ng-ts:directive dateTimeNow

Creates three files:

  • dateTimeNow.directive.controller.ts
  • dateTimeNow.directive.ts
  • dateTimeNow.directive.html

Gulp Tasks

The gulpfile has a built-in help page that lists all the tasks and provides a short description:

gulp help

Getting To Know Yeoman

Read the complete Getting Started Guide.

License

MIT © Oliver Lohmann