npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

generator-durandal2

1.0.2 • Public • Published

About This Generator

This will get you up and running with a skeleton SPA using the Durandal framework and pre-configured Gulp tasks.

Language Support:

  • JavaScript(ES5)
  • TypeScript

UI Options:

Planned Updates:

  • Bower support
  • JSPM
  • Babel6

Getting Started

Environment Setup

Ensure that NodeJS is installed. This provides the platform on which the build tooling runs. From the project folder, execute the following command:

npm install

Ensure that Gulp is installed globally. If you need to install it, use the following command:

npm install -g gulp

Note: Gulp must be installed globally, but a local version will also be installed to ensure a compatible version is used for the project.

Install Yeoman

This generator needs Yeoman to be installed.

npm install -g yo

Install Generator

To install generator-durandal2 from npm, run:

npm install -g generator-durandal2

Then, initiate the generator:

yo durandal2

Development

Run the Application

Note: If using TypeScript configuration, install necessary type definitions

typings install
gulp watch
 

Browse to http://localhost:9000 to see the app. You can make changes in the code found under app and the browser should auto-refresh itself as you save files.

This template uses BrowserSync for automated page refreshes on code/markup changes concurrently across multiple browsers. If you prefer to disable the mirroring feature set the ghostMode option to false

Sub Generators

ViewModel

You can create a viewmodel the following subgenerator. You can choose between TypeScript or JavaScript.

yo durandal2:viewmodel {name} {transpiler} (--transient)

Note: Passing --transient will create a viewmodel with a transient lifecycle

License

MIT License

install

npm i generator-durandal2

Downloadsweekly downloads

40

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability