The output of the Gruntfile is an empty file in public/assets/app.js. The Sass-part works fine, but the JS-part doesn't.
//Gruntfile
module.exports = function(grunt) {
//Initializing the configuration object
grunt.initConfig({
// Task…
I am new to grunt and task runners in JS, so this might seem a simple question but I have been unable to find exact working answer.
I have :
concat: {
options: {
// define a string to put between each file in the…
I'm using grunt concat and uglify to minify angular app however the minified script is giving the following error.
Uncaught Error: [$injector:modulerr]
…
I have multiple JSON files, each located in different paths.
Now I'm trying to concat all files with "grunt-concat-json".
The source JSON files are looking like this:
ExampleA.json
[ {
"configPath": "Example A"
} ]
ExampleB.json
[ {
…
I'm trying to minify and combine multiple CSS files using Grunt.js concat and cssmin from different directories.
Unfortunately, css breaks since each CSS has relative link to resources, for example:
background-image: url('images/background.jpg');
I…
I write different files under JavaScript Module Patern like this:
file 1.js
var Module = (function (module) {
module.function = function () {
console.log(this.thirdFunction) // This is my issue. I cannot access the function from the third…
I have a folder structure like this
ProjectX
.......|_____node_modules
.......|_____src
.......|_____build
.......|_____app
.......|_____libraries
I have written a glob pattern in grunt browserify something like…
I'm trying to get started with a simple Grunt example, but I'm running into an issue with grunt-contrib-concat.
Here's my Gruntfile.js:
$ cat Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg:…
When running grunt concat the console says my source map is created, but the source map is not present on my file system.
My plugin configuration in my Gruntfile:
grunt.config('concat',{
scripts: {
src: [
…
So i've been searching for the best way of concatenate n (log) files in node.js
The final file cannot be more than 100MB, if there is more, i should create an other one and so on.
I have some different approaches:
Use grunt and grunt and…
I have a real issue now, When I'm on Production and when ever I update my CSS or JS the same file keeps on serving from the server.. I i need to get the new updates then I have to hard refresh the browser,
I'm thinking of having a way to add a build…
In my Angular JS app, I'm using a lot of third party packages, mainly maintained via Bower.
When I use Grunt to concatenate all of them into one mega file, I'm getting errors when I load my page, for example that
Uncaught ReferenceError: angular…
I have three files containing js classes:
A.js
B.js
C.js
I'm trying to concatenate them to get something like:
var Module = (function (scope) {
// content of concatenation (ABC.js)
})(scope);
For now I'm using…
I have been spending over an hour on this one, looked through several questions, but the answer is nowhere to be found.
I am running into a problem when using watch on my javascript files. All of the other files are watched and the tasks are…