提交 2001154a 编写于 作者: M Manuel Recena 提交者: Oleg Nenashev

[JENKINS-34438] - Activate JSHint through js-builder (#2367)

上级 a3ddc89a
var gulp = require('gulp');
var jshint = require('gulp-jshint');
//
// See https://github.com/tfennelly/jenkins-js-builder
//
......@@ -26,13 +23,13 @@ builder.bundle('src/main/js/pluginSetupWizard.js')
.inDir('src/main/webapp/jsbundles');
//
//Bundle the Upgrade Wizard.
// Bundle the Upgrade Wizard.
//
builder.bundle('src/main/js/upgradeWizard.js')
.withExternalModuleMapping('jquery-detached', 'core-assets/jquery-detached:jquery2')
.withExternalModuleMapping('bootstrap', 'core-assets/bootstrap:bootstrap3')
.withExternalModuleMapping('handlebars', 'core-assets/handlebars:handlebars3')
.inDir('src/main/webapp/jsbundles');
.withExternalModuleMapping('jquery-detached', 'core-assets/jquery-detached:jquery2')
.withExternalModuleMapping('bootstrap', 'core-assets/bootstrap:bootstrap3')
.withExternalModuleMapping('handlebars', 'core-assets/handlebars:handlebars3')
.inDir('src/main/webapp/jsbundles');
//
// Bundle the Config Tab Bar.
......@@ -56,13 +53,3 @@ builder.bundle('src/main/js/add-item.js')
.withExternalModuleMapping('jquery-detached', 'core-assets/jquery-detached:jquery2')
.less('src/main/js/add-item.less')
.inDir('src/main/webapp/jsbundles');
//
// JSHint, a JavaScript Code Quality Tool
//
gulp.task('lint', function() {
return gulp.src('src/main/js/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(jshint.reporter('fail'));
});
......@@ -16,8 +16,6 @@
"jenkins-handlebars-rt": "^1.0.1",
"jenkins-js-builder": "0.0.40",
"jenkins-js-test": "^1.0.0",
"jshint": "^2.9.2",
"gulp-jshint": "^2.0.0",
"gulp-less": "^3.1.0"
},
"dependencies": {
......
......@@ -630,7 +630,11 @@ THE SOFTWARE.
</profile>
<profile>
<id>node-download</id>
<activation><file><exists>package.json</exists></file></activation>
<activation>
<file>
<exists>package.json</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
......@@ -736,7 +740,7 @@ THE SOFTWARE.
<goal>gulp</goal>
</goals>
<configuration>
<arguments>lint bundle</arguments>
<arguments>jshint bundle</arguments>
</configuration>
</execution>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册