diff --git a/example-bootstrap.js b/example-bootstrap.js deleted file mode 100644 index bb3724e552..0000000000 --- a/example-bootstrap.js +++ /dev/null @@ -1,26 +0,0 @@ -var exampleReady = function() { - console.error('Implement exampleReady to bootstrap your app.\n' + - 'For example: `function exampleReady() { System.import("./main"); }`'); -}; - -(function() { - - var loaded = 0; - var scripts = [ - '/jspm-config.js', - 'https://cdn.rawgit.com/angular/zone.js/v0.4.1/zone.js', - 'https://cdn.rawgit.com/angular/zone.js/v0.4.1/long-stack-trace-zone.js', - 'https://cdn.rawgit.com/robwormald/50b6b855a6ce21af6967/raw/aa9e1c0eed78defd890ccfcc50c4b4648d4d891d/angular2.js' - ]; - - scripts.forEach(function(src) { - var script = document.createElement('script'); - script.async = true; - script.onload = function() { - if (++loaded == scripts.length) exampleReady(); - }; - document.head.appendChild(script); - script.src = src; - }); - -})(); diff --git a/gulpfile.js b/gulpfile.js index 637eb718a0..4717302f55 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,13 +12,14 @@ var concat = require('gulp-concat'); var debug = require('gulp-debug'); var del = require('del'); var exec = require('gulp-exec'); +var gulpif = require('gulp-if'); var karma = require('karma').server; var plumber = require('gulp-plumber'); var rename = require('gulp-rename'); var sass = require('gulp-sass'); var shell = require('gulp-shell'); var traceur = require('gulp-traceur'); -var template = require('gulp-template'); +var wrap = require('gulp-wrap'); gulp.task('default', ['js', 'html', 'sass', 'libs', 'playgroundJs', 'playgroundFiles']); @@ -39,10 +40,6 @@ gulp.task('watch', ['default'], function() { console.log('Serving `dist` on http://localhost:' + port); }); -gulp.task('lint', shell.task([ - './node_modules/.bin/standard' -])); - gulp.task('karma', function() { return karma.start({ configFile: __dirname + '/scripts/test/karma.conf.js' }); }); @@ -139,3 +136,17 @@ gulp.task('angular2', function () { .pipe(gulp.dest('dist/lib')); }); +gulp.task('examples', function() { + var mainFileRegex = /(main|index).html$/; + return gulp.src('src/components/**/examples/**/*') + .pipe(gulpif(mainFileRegex, wrap({ + src: 'scripts/examples/index.template.html' + }))) + .pipe(gulpif(mainFileRegex, rename({ + basename: 'index.html' + }))) + .pipe(rename(function(file) { + file.dirname = file.dirname.replace('/examples/', '/'); + })) + .pipe(gulp.dest('dist/examples/')); +}); diff --git a/jspm-config.js b/jspm-config.js index ac465b26a1..57891725b9 100644 --- a/jspm-config.js +++ b/jspm-config.js @@ -1,12 +1,12 @@ System.config({ - traceurOptions: { - annotations: true, - types: true, - memberVariables: true - }, "paths": { "*": "*.js", "github:*": "/jspm_packages/github/*.js" + }, + "traceurOptions": { + "annotations": true, + "types": true, + "memberVariables": true } }); diff --git a/package.json b/package.json index 2079544ff4..4fa77c2961 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "gulp-sass": "^1.3.3", "gulp-shell": "^0.4.0", "gulp-traceur": "0.16.*", - "gulp-wrap": "~0.11.0", + "gulp-wrap": "^0.11.0", "karma": "^0.12.31", "serve-static": "~1.8.1", "systemjs": "^0.11.3", @@ -27,7 +27,6 @@ "es6-module-loader": "~0.11.0", "event-stream": "^3.3.0", "gulp-template": "^3.0.0", - "hammerjs": "^2.0.4", "jasmine-core": "^2.2.0", "karma-chrome-launcher": "^0.1.7", "karma-jasmine": "^0.3.5", diff --git a/scripts/examples/index.template.html b/scripts/examples/index.template.html index 86c35a4ca6..cd4c6ef815 100644 --- a/scripts/examples/index.template.html +++ b/scripts/examples/index.template.html @@ -1,33 +1,22 @@ - - -
- - + + + + - - - - - - - - - - - - -...
+...
+...
+ Side menu! +...
+...
+...
+ Side menu! +...
+...
+...
+ Side menu! +...
+...
+...
+ Side menu! +...
-...
-...
- Side menu! -...
-...
-...
- Side menu! -...
-...
-...
- Side menu! -...
-...
-...
- Side menu! -