Bladeren bron

fix import lint

sebavan 6 jaren geleden
bovenliggende
commit
bd180c6356
2 gewijzigde bestanden met toevoegingen van 29 en 7 verwijderingen
  1. 1 1
      .travis.yml
  2. 28 6
      Tools/Gulp/tasks/gulpTasks-importLint.js

+ 1 - 1
.travis.yml

@@ -21,7 +21,7 @@ jobs:
     script: gulp tests-whatsnew
     script: gulp tests-whatsnew
   - env: JOB=DocumentationCheck
   - env: JOB=DocumentationCheck
     script: gulp typedoc-check
     script: gulp typedoc-check
-  - env: JOB=Styling
+  - env: JOB=Linting
     script: gulp fullLint
     script: gulp fullLint
   - env: JOB=Build
   - env: JOB=Build
     script: gulp typescript-all
     script: gulp typescript-all

+ 28 - 6
Tools/Gulp/tasks/gulpTasks-importLint.js

@@ -4,10 +4,21 @@ var filter = require('gulp-filter');
 
 
 // Helpers.
 // Helpers.
 var validateImports = require("../helpers/gulp-validateImports");
 var validateImports = require("../helpers/gulp-validateImports");
+var uncommentShaders = require('../helpers/gulp-removeShaderComments');
+var processShaders = require("../helpers/gulp-processShaders");
 
 
 // Read the full config.
 // Read the full config.
 var config = require("../../Config/config.js");
 var config = require("../../Config/config.js");
 
 
+/**
+ * Create shader ts files.
+ */
+var buildShaders = function(settings) {
+    return gulp.src(settings.computed.shaderGlob)
+            .pipe(uncommentShaders())
+            .pipe(processShaders(settings.isCore));
+}
+
 /*
 /*
  * ImportLint all typescript files from the src directory.
  * ImportLint all typescript files from the src directory.
  */
  */
@@ -23,15 +34,26 @@ var importLintLibrary = function(settings) {
 /**
 /**
  * Dynamic module linting for library (mat, post processes, ...).
  * Dynamic module linting for library (mat, post processes, ...).
  */
  */
-config.lintModules.map(function(module) {
-    // Task will be like moduleName-importLint
-    gulp.task(module + "-importLint", function() {
-        var settings = config[module];
+var lintLibrary = function(settings) {
+    var tasks = [];
+
+    var shaders = function() { return buildShaders(settings); };
+    var lint = function() { return importLintLibrary(settings); };
+
+    tasks.push(shaders, lint);
 
 
-        return importLintLibrary(settings, false);
-    });
+    return gulp.series.apply(this, tasks);
+};
+
+/**
+ * Dynamic module linting for library (mat, post processes, ...).
+ */
+config.lintModules.map(function(module) {
+    const settings = config[module];
+    gulp.task(module + "-importLint", lintLibrary(settings));
 });
 });
 
 
+
 /**
 /**
  * Full Librairies importLint.
  * Full Librairies importLint.
  */
  */