snadrus / grunt-rev-all Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hello,
Turning the grunt-rev-all task, I came across the following error: ** Fatal error: Can not read property 'length' of null **.
As I'm not sure what to say about this error, I created a test repository to play such a problem here.
I made the following modifications - even without understanding - in the file grunt-rev-all.js of package, in line 90, in order to avoid the "Fatal error":
if (!linksFound[lenToEnd] || !refPath.match(/\//g)) continue;
I'm available.
Thank you!
At line:
https://github.com/snadrus/grunt-rev-all/blob/master/tasks/grunt-rev-all.js#L146
You are checking completedSet.length == ctAllFiles
however completedSet is an object graph not an array so length is always undefined. This prevents the done() call which prevents tasks defined after grunt-rev-all from executing.
After undergoing an extensive list of files, it happens a fatal error: "Fatal error: Invalid string length".
Not exactly know what information I share to try to find out the error reason. Any suggestion?
Following is the message that was written on my console while running gulp task:
root@jefferson-aspirefdf-481pt:/var/www/hiperonline# grunt rev-all
Grunt and task output will also be logged to "./logs/grunt.log"
Running "grunt-rev-all:dist" (grunt-rev-all) task
Found 848 files. Looking for links in 626 files.
dist/app/assets/bower_components/angular-aria/angular-aria.min.js contains 2 links.
dist/app/assets/bower_components/angular-animate/angular-animate.js contains 1 link.
dist/app/assets/bower_components/angular-animate/angular-animate.min.js contains 2 links.
dist/app/assets/bower_components/angular-cookies/angular-cookies.min.js contains 2 links.
dist/app/assets/bower_components/angular-material/angular-material-mocks.js contains 2 links.
dist/app/assets/bower_components/angular-material/angular-material.js contains 1 link.
dist/app/assets/bower_components/angular-material/modules/closure/core/core.js contains 1 link.
dist/app/assets/bower_components/angular-material/modules/closure/dialog/dialog.js contains 1 link.
dist/app/assets/bower_components/angular-material/modules/closure/dialog/dialog.min.js contains 1 link.
dist/app/assets/bower_components/angular-material/modules/js/dialog/dialog.min.js contains 1 link.
dist/app/assets/bower_components/angular-material/modules/js/dialog/dialog.js contains 1 link.
dist/app/assets/bower_components/angular-material/modules/js/core/core.js contains 1 link.
dist/app/assets/bower_components/angular-resource/angular-resource.min.js contains 2 links.
dist/app/assets/bower_components/angular-route/angular-route.js contains 2 links.
dist/app/assets/bower_components/angular-route/angular-route.min.js contains 2 links.
dist/app/assets/bower_components/angular-sanitize/angular-sanitize.min.js contains 2 links.
dist/app/assets/bower_components/angular-sanitize/angular-sanitize.js contains 1 link.
dist/app/assets/bower_components/angular-touch/angular-touch.min.js contains 2 links.
dist/app/assets/bower_components/angular-touch/angular-touch.js contains 1 link.
dist/app/assets/bower_components/bootstrap/Gruntfile.js contains 25 links.
dist/app/assets/bower_components/bootstrap/dist/css/bootstrap-theme.css contains 2 links.
dist/app/assets/bower_components/angular/angular.min.js contains 2 links.
dist/app/assets/bower_components/bootstrap/dist/css/bootstrap.css contains 6 links.
dist/app/assets/bower_components/bootstrap/js/affix.js contains 1 link.
dist/app/assets/bower_components/bootstrap/js/carousel.js contains 1 link.
dist/app/assets/bower_components/bootstrap/js/alert.js contains 1 link.
dist/app/assets/bower_components/bootstrap/js/button.js contains 1 link.
dist/app/assets/bower_components/bootstrap/js/collapse.js contains 1 link.
dist/app/assets/bower_components/bootstrap/js/dropdown.js contains 1 link.
dist/app/assets/bower_components/bootstrap/js/modal.js contains 1 link.
dist/app/assets/bower_components/bootstrap/js/popover.js contains 2 links.
dist/app/assets/bower_components/bootstrap/js/scrollspy.js contains 1 link.
dist/app/assets/bower_components/bootstrap/dist/css/bootstrap.min.css contains 4 links.
dist/app/assets/bower_components/bootstrap/js/tab.js contains 1 link.
dist/app/assets/bower_components/bootstrap/js/tooltip.js contains 1 link.
dist/app/assets/bower_components/bootstrap/js/transition.js contains 1 link.
dist/app/assets/bower_components/fontawesome/css/font-awesome.css contains 4 links.
dist/app/assets/bower_components/fontawesome/css/font-awesome.min.css contains 4 links.
dist/app/assets/bower_components/jquery/src/ajax.js contains 1 link.
dist/app/assets/bower_components/jquery/src/ajax/jsonp.js contains 1 link.
dist/app/assets/bower_components/jquery/src/ajax/parseJSON.js contains 1 link.
dist/app/assets/bower_components/jquery/src/ajax/load.js contains 1 link.
dist/app/assets/bower_components/jquery/src/ajax/parseXML.js contains 1 link.
dist/app/assets/bower_components/jquery/src/ajax/script.js contains 1 link.
dist/app/assets/bower_components/jquery/src/ajax/xhr.js contains 1 link.
dist/app/assets/bower_components/jquery/src/attributes/classes.js contains 1 link.
dist/app/assets/bower_components/jquery/src/attributes/attr.js contains 1 link.
dist/app/assets/bower_components/jquery/src/attributes/prop.js contains 1 link.
dist/app/assets/bower_components/jquery/src/attributes/support.js contains 1 link.
dist/app/assets/bower_components/jquery/src/attributes/val.js contains 1 link.
dist/app/assets/bower_components/jquery/src/core/access.js contains 1 link.
dist/app/assets/bower_components/jquery/src/core/ready.js contains 1 link.
dist/app/assets/bower_components/jquery/src/core/parseHTML.js contains 1 link.
dist/app/assets/bower_components/jquery/src/core/init.js contains 1 link.
dist/app/assets/bower_components/jquery/src/css/addGetHookIf.js contains 1 link.
dist/app/assets/bower_components/jquery/src/css/curCSS.js contains 1 link.
dist/app/assets/bower_components/jquery/src/css/defaultDisplay.js contains 1 link.
dist/app/assets/bower_components/jquery/src/css/hiddenVisibleSelectors.js contains 1 link.
dist/app/assets/bower_components/jquery/src/css/support.js contains 1 link.
dist/app/assets/bower_components/jquery/src/css/swap.js contains 1 link.
dist/app/assets/bower_components/jquery/src/data/accepts.js contains 1 link.
dist/app/assets/bower_components/jquery/src/data/Data.js contains 1 link.
dist/app/assets/bower_components/jquery/dist/jquery.min.js contains 1 link.
dist/app/assets/bower_components/angular/angular.js contains 5 links.
dist/app/assets/bower_components/jquery/src/effects/Tween.js contains 1 link.
dist/app/assets/bower_components/jquery/src/effects/animatedSelector.js contains 1 link.
dist/app/assets/bower_components/jquery/src/event/ajax.js contains 1 link.
dist/app/assets/bower_components/jquery/src/event/support.js contains 1 link.
dist/app/assets/bower_components/jquery/src/event/alias.js contains 1 link.
dist/app/assets/bower_components/jquery/src/manipulation/_evalUrl.js contains 1 link.
dist/app/assets/bower_components/jquery/src/manipulation/support.js contains 1 link.
dist/app/assets/bower_components/jquery/src/queue/delay.js contains 1 link.
dist/app/assets/bower_components/jquery/src/sizzle/dist/sizzle.min.js contains 1 link.
dist/app/assets/bower_components/jquery/src/traversing/findFilter.js contains 1 link.
dist/app/assets/bower_components/require-css/css.js contains 1 link.
dist/app/assets/bower_components/require-css/normalize.js contains 1 link.
dist/app/assets/bower_components/requirejs-plugins/examples/async.html contains 1 link.
dist/app/assets/bower_components/requirejs-plugins/examples/goog.html contains 1 link.
dist/app/assets/bower_components/requirejs-plugins/examples/font.html contains 1 link.
dist/app/assets/bower_components/requirejs-plugins/examples/image.html contains 4 links.
dist/app/assets/bower_components/requirejs-plugins/examples/img/relativePath.js contains 1 link.
dist/app/assets/bower_components/requirejs-plugins/examples/json.html contains 3 links.
dist/app/assets/bower_components/requirejs-plugins/examples/mdown.html contains 3 links.
dist/app/assets/bower_components/requirejs-plugins/examples/noext.html contains 3 links.
dist/app/assets/bower_components/requirejs-plugins/lib/text.js contains 1 link.
dist/app/assets/bower_components/requirejs-plugins/src/font.js contains 1 link.
dist/app/assets/bower_components/requirejs-plugins/lib/require.js contains 1 link.
dist/app/assets/main.js contains 1 link.
dist/app/index.html contains 2 links.
Fatal error: Invalid string length
gruntfile.js
module.exports = function(grunt) {
require('logfile-grunt')(grunt);
grunt.initConfig({
'grunt-rev-all': {
dist: {
src: ['dist/app/**/*'],
root: 'dist/app/',
hasLinks: ['.html', '.css', '.js', '.jpg', '.png', '.ico', '.svg'],
runtimeBase: {
'dist/app/': ['dist/app/assets/styles/**/*', 'dist/app/assets/images/**/*', 'dist/app/assets/partials/**/*']
},
lookLocal: ['dist/app/assets/**/*'],
noRev: ['.map', '.gzip', '.json', '.md', 'dist/app/assets/bower_components/**/*']
}
}
});
grunt.loadNpmTasks('grunt-rev-all');
grunt.registerTask('rev-all', ['grunt-rev-all:dist']);
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.