feat(examples): adds hello-world app.
The app is writen in ES6 and transpiles to ES5 and dart as part of the usual build. The app contains a component, a directive and a services wired together through dependency injection. Before Each: - gulp build For es5: - gulp serve - open 'localhost:8000/js/examples/lib/hello_world/' For dart: - gulp examples/pub.serve - open 'localhost:8080'
This commit is contained in:
10
gulpfile.js
10
gulpfile.js
@ -69,7 +69,8 @@ gulp.task('jsRuntime/build', function() {
|
||||
var sourceTypeConfigs = {
|
||||
dart: {
|
||||
transpileSrc: ['modules/**/*.js'],
|
||||
htmlSrc: ['modules/*/src/**/*.html'],
|
||||
// pub serve uses project_root/web for static serving.
|
||||
htmlSrc: ['modules/*/src/**/*.html', 'modules/*/web/*.html'],
|
||||
copySrc: ['modules/**/*.dart'],
|
||||
outputDir: 'build/dart',
|
||||
outputExt: 'dart',
|
||||
@ -296,7 +297,7 @@ gulp.task('benchmarks/build.dart', function() {
|
||||
|
||||
|
||||
// ------------------
|
||||
// WEB SERVER
|
||||
// WEB SERVERS
|
||||
|
||||
gulp.task('serve', function() {
|
||||
connect.server({
|
||||
@ -315,6 +316,11 @@ gulp.task('serve', function() {
|
||||
})();
|
||||
});
|
||||
|
||||
gulp.task('examples/pub.serve', function(done) {
|
||||
spawn('pub', ['serve'], {cwd: 'build/dart/examples', stdio: 'inherit'})
|
||||
.on('done', done);
|
||||
});
|
||||
|
||||
|
||||
|
||||
// --------------
|
||||
|
Reference in New Issue
Block a user