Major update to code structure

   * Split files into independent files based on functionality.
   * Switch to bower/gulp for build.

Change-Id: Ibc775dd9b7f6a0a49f63c22162b7582e781e2d9c
Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
diff --git a/gulp_tasks/checkstyle.js b/gulp_tasks/checkstyle.js
new file mode 100644
index 0000000..bd76a8b
--- /dev/null
+++ b/gulp_tasks/checkstyle.js
@@ -0,0 +1,31 @@
+/*eslint-env node */
+/*global require: true, module: true */
+
+'use strict';
+
+var options = require('../gulp-options.js'),
+    gulp = require('gulp'),
+    clean = require('gulp-clean'),
+    eslint = require('gulp-eslint');
+
+var runSequence = require('run-sequence'),
+    fs = require('fs');
+
+gulp.task('checkstyle:clean', function () {
+    return gulp
+        .src([options.targetFolderPath + '/eslint-report-checkstyle.xml'], {'read': false})
+        .pipe(clean({'force': true}));
+});
+
+gulp.task('checkstyle:eslint', function () {
+    return gulp
+        .src([options.srcFolderPath + '/**/*.js', options.excludePath])
+        .pipe(eslint({'useEslintrc': true}))
+        .pipe(eslint.format('checkstyle', function (output) {
+            fs.writeFileSync(options.targetFolderPath + '/eslint-report-checkstyle.xml', output);
+        }));
+});
+
+module.exports = function (callback) {
+    return runSequence('checkstyle:clean', 'checkstyle:eslint', callback);
+};