Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(build): add a validation step for angularFiles #13553

Closed
wants to merge 1 commit into from

Conversation

matsko
Copy link
Contributor

@matsko matsko commented Dec 15, 2015

The output looks like this (when passing):

Running "validate-angular-files" task
Validating 13 files from the 'ngAnimate' module
Validating 5 files from the 'ngCookies' module
Validating 7 files from the 'ngMessageFormat' module
Validating 3 files from the 'ngMessages' module
Validating 3 files from the 'ngResource' module
Validating 5 files from the 'ngRoute' module
Validating 4 files from the 'ngSanitize' module
Validating 3 files from the 'ngMock' module
Validating 6 files from the 'ngTouch' module
Validating 3 files from the 'ngAria' module
Validating 76 files from the 'ng' module
Validating 5 files from the 'angularLoader' module
All files were detected successfully!

When failing (when a file is referenced in a module but doesn't exist in the local filesystem):

Running "validate-angular-files" task
Validating 14 files from the 'ngAnimate' module
>> src/ngAnimate/referenced-but-missing-file.js does not exist in the local file structure
Validating 5 files from the 'ngCookies' module
Validating 7 files from the 'ngMessageFormat' module
Validating 3 files from the 'ngMessages' module
Validating 3 files from the 'ngResource' module
Validating 5 files from the 'ngRoute' module
Validating 4 files from the 'ngSanitize' module
Validating 3 files from the 'ngMock' module
Validating 6 files from the 'ngTouch' module
Validating 3 files from the 'ngAria' module
Validating 76 files from the 'ng' module
Validating 5 files from the 'angularLoader' module
Warning: Not all files were properly detected the local file structure Use --force to continue.

When failing (when a file exists locally but isn't used in any module):

Running "validate-angular-files" task
Validating 13 files from the 'ngAnimate' module
Validating 5 files from the 'ngCookies' module
Validating 7 files from the 'ngMessageFormat' module
Validating 3 files from the 'ngMessages' module
Validating 3 files from the 'ngResource' module
Validating 5 files from the 'ngRoute' module
Validating 4 files from the 'ngSanitize' module
Validating 3 files from the 'ngMock' module
Validating 6 files from the 'ngTouch' module
Validating 3 files from the 'ngAria' module
Validating 76 files from the 'ng' module
Validating 5 files from the 'angularLoader' module
>> src/ngAnimate/missing-file exists in the local file structure but isn't used by any module
Warning: Not all files were properly detected the local file structure Use --force to continue.

@matsko
Copy link
Contributor Author

matsko commented Dec 15, 2015

@petebacondarwin and @IgorMinar please review.

@@ -354,7 +406,7 @@ module.exports = function(grunt) {

grunt.registerTask('minify', ['bower','clean', 'build', 'minall']);
grunt.registerTask('webserver', ['connect:devserver']);
grunt.registerTask('package', ['bower','clean', 'buildall', 'minall', 'collect-errors', 'docs', 'copy', 'write', 'compress']);
grunt.registerTask('package', ['bower', 'validate-angular-files','clean', 'buildall', 'minall', 'collect-errors', 'docs', 'copy', 'write', 'compress']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to this PR, but there's a space missing before 'clean' 😁

@petebacondarwin
Copy link
Contributor

This is missing a required change to npm shrinkwrap

@@ -339,6 +341,56 @@ module.exports = function(grunt) {
grunt.task.run('shell:npm-install');
}

grunt.registerTask('validate-angular-files', function() {
var combinedFiles = Object.assign({}, files.angularModules);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use lodash here for assign(), so no actual need for Node 4

@petebacondarwin
Copy link
Contributor

Last thing is that I think the task should be in its own file in lib/grunt/

I have created a new PR with a number of these changes...
#13569

@matsko matsko closed this in 0387298 Dec 17, 2015
matsko added a commit that referenced this pull request Dec 17, 2015
matsko added a commit that referenced this pull request Dec 17, 2015
matsko added a commit that referenced this pull request Dec 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants