Answer the question
In order to leave comments, you need to log in
Why don't scripts work when building a project on Grunt?
Good morning! :)
I collect the project with the help of soil.
But when you run the collected files, the scripts refuse to work.
It sticks together in my opinion, but even the console.log does not work :(
Here is the code (not complete):
bower.json
{
"devDependencies": {
"bootstrap": "~3.3.2",
"jquery": "~2.1.3",
"jquery-ui": "~1.11.2",
"jquery-slimscroll": "~1.3.3",
"font-awesome": "~4.3.0"
}
}
module.exports = function (grunt) {
grunt.initConfig({
bower_concat: {
main: {
cssDest: 'build/_bower.css',
dest: 'build/_bower.js'
}
},
concat_css: {
main: {
src: [
'build/_bower.css',
'css/*.css'
],
dest: 'build/styles.css'
}
},
concat: {
main: {
src: [
'build/_bower.js'
// 'js/*.js'
],
dest: 'build/scripts.js'
}
}
});
require('load-grunt-tasks')(grunt);
grunt.registerTask('default', [
'bower_concat',
'concat_css',
'concat',
]);
};
{
"main": "Gruntfile.js"
},
"devDependencies": {
"grunt": "~0.4.5",
"load-grunt-tasks": "~3.0.0",
"grunt-concat-css": "~0.3.1",
"grunt-bower-concat": "~0.4.0",
"grunt-contrib-concat": "~0.5.0"
}
}
console.log('1'); // выполняется (до вхождения в мой скрипт)
$(document).load(function () { // а вот сюда уже не попадает :(
console.log('2'); // не выполняется (после вхождения)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question