diff --git a/gulpfile.js b/gulpfile.js
index 3cf2bbb1..eb85b527 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -44,7 +44,7 @@ var tasks = [
tasks.forEach(function(task) {
var run = require('gulp-run');
- gulp.task(task.cmd, task.help, ['lint'], function() {
+ gulp.task(task.cmd, task.help, ['lint-' + task.cmd], function() {
// We expected that mocha-phantomjs print colorized results, but it isn't.
// So, I take a fast way that is using gulp-run.
return run('`npm bin`/mocha-phantomjs ' + task.url + ' || true').exec();
@@ -52,12 +52,14 @@ tasks.forEach(function(task) {
});
-gulp.task('lint', 'ミスのおこりやすいコード・可読性の低いコードがないか検査します', function() {
- var eslint = require('gulp-eslint');
+tasks.forEach(function(task) {
+ gulp.task('lint-' + task.cmd, 'ミスのおこりやすいコード・可読性の低いコードがないか検査します', function() {
+ var eslint = require('gulp-eslint');
- return gulp.src('test/**/*.js')
- .pipe(eslint())
- .pipe(eslint.format());
+ return gulp.src(task.src)
+ .pipe(eslint())
+ .pipe(eslint.format());
+ });
});
diff --git a/test/stage1/analytics.js b/test/stage1/analytics.js
index 867daa7a..d2e4b2d1 100644
--- a/test/stage1/analytics.js
+++ b/test/stage1/analytics.js
@@ -1,5 +1,9 @@
(function() {
'use strict';
+ // PhantomJS s not supporting web components yet.
+ // And some polyfills (as webcomponents/webcomponents.js) are not worked well.
+ if (!('registerElement' in document)) { return; }
+
var XFlyingSushiMonsterProto = Object.create(HTMLDivElement.prototype);
XFlyingSushiMonsterProto.createdCallback = function() {
this.textContent = '\uD83C\uDF63';
diff --git a/test/stage1/index.html b/test/stage1/index.html
index ad288bcb..3e138bb8 100644
--- a/test/stage1/index.html
+++ b/test/stage1/index.html
@@ -41,6 +41,9 @@
+
+
+
+
+
+
+
+
+