add examples instructions to readme

This commit is contained in:
Andrew
2015-03-23 09:20:43 -06:00
parent a883fab519
commit 91ac22c1c7
2 changed files with 5 additions and 8 deletions

View File

@@ -9,10 +9,11 @@
- `npm install -g jspm`
- `jspm install`
- `gulp examples`
- `python -m SimpleHTTPServer .`
- `open http://localhost:8000/playground/basic-example/`
- Follow the structure found in playground/basic-example to
easily create more examples.
- `open http://localhost:9000/dist/examples/aside/basic/index.html`
- Follow the structure found in src/components/aside/examples/basic
to create more examples.
#### Problems already

View File

@@ -137,14 +137,10 @@ gulp.task('angular2', function () {
});
gulp.task('examples', function() {
var mainFileRegex = /(main|index).html$/;
return gulp.src('src/components/**/examples/**/*')
.pipe(gulpif(mainFileRegex, wrap({
.pipe(gulpif(/index.html/, wrap({
src: 'scripts/examples/index.template.html'
})))
.pipe(gulpif(mainFileRegex, rename({
basename: 'index.html'
})))
.pipe(rename(function(file) {
file.dirname = file.dirname.replace('/examples/', '/');
}))