Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://secure.travis-ci.org/swirlycheetah/generator-angular2.png?branch=master)](https://travis-ci.org/swirlycheetah/generator-angular2) [![Join the chat at https://gitter.im/swirlycheetah/generator-angular2](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/swirlycheetah/generator-angular2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A [Yeoman](http://yeoman.io) Generator to aid in bootstrapping an Angular2 application using the very latest Angular2 alpha release.
A [Yeoman](http://yeoman.io) Generator to aid in bootstrapping an Angular2 application using the very latest Angular2 Beta release.

### Getting Started

Expand All @@ -22,6 +22,12 @@ You'll be prompted to start the server once the generator has finished.

You'll then be able to access the application at `http://localhost:8000`. Serving the application can be configured in the `gulpfile.js` using [gulp-webserver](https://www.npmjs.com/package/gulp-webserver) options.

To run this server, execute this command in your terminal:

```bash
gulp dev
```

### Generated Structure

The structure generated is;
Expand All @@ -32,7 +38,7 @@ The structure generated is;
- index.html
- {generated-file-name}.js
- {generated-file-name}.html
- .editorconfig
- .editorconfig
- .gitignore
- gulpfile.js
- package.json
Expand Down
15 changes: 8 additions & 7 deletions app/templates/_gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ gulp.task('dev', ['watch', 'serve']);
gulp.task('serve', function () {
gulp.src('build')
.pipe(webserver({
open: true
livereload: true,
open: true,
}));
});

Expand All @@ -35,7 +36,7 @@ gulp.task('dependencies', function () {
'node_modules/angular2/bundles/angular2-polyfills.js',
'node_modules/rxjs/bundles/Rx.js',
'node_modules/es6-shim/es6-shim.min.js',
'node_modules/es6-shim/es6-shim.map'
'node_modules/es6-shim/es6-shim.map',
])
.pipe(gulp.dest('build/lib'));
});
Expand All @@ -44,29 +45,29 @@ gulp.task('dependencies', function () {
gulp.task('js', function () {
return gulp.src('src/**/*.js')
.pipe(rename({
extname: ''
extname: '',
}))
.pipe(traceur({
modules: 'instantiate',
moduleName: true,
annotations: true,
types: true,
memberVariables: true
memberVariables: true,
}))
.pipe(rename({
extname: '.js'
extname: '.js',
}))
.pipe(gulp.dest('build'));
});

// move html
gulp.task('html', function () {
return gulp.src('src/**/*.html')
.pipe(gulp.dest('build'))
.pipe(gulp.dest('build'));
});

// move css
gulp.task('css', function () {
return gulp.src('src/**/*.css')
.pipe(gulp.dest('build'))
.pipe(gulp.dest('build'));
});