Grunt dependencies conflicts in Bootstrap

I ran into this problem this morning too. I ended up changing line 30 in Bootstrap’s package.json file: from “~0.4.2” to “0.4.2”: 27 “devDependencies”: { … 30 “grunt” : “0.4.2” This means that 0.4.3 no longer matches the dependency spec but it also means you won’t install new versions of grunt later. It’s enough to … Read more

How to ignore files grunt uglify

To the end of the src array, add ‘!docroot/js/main.min.js’ This will exclude it. The ! turns it into an exclude. http://gruntjs.com/api/grunt.file#grunt.file.expand Paths matching patterns that begin with ! will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant. This is not specific to grunt uglify, but … Read more

How can I make Heroku install devDependencies?

UPDATE: as pointed out in the comments this is no more needed because since 2018 heroku changed its default behaviour and dev dependencies are automatically installed ORIGINAL ANSWER Heroku by default installs only the production dependencies, ignoring the development dependencies under devDependencies. Setting the npm production variable to false do the trick: heroku config:set NPM_CONFIG_PRODUCTION=false … Read more

Cannot find module ‘internal/fs’ after upgrading to node 7

First, open the console as administrator (or in the terminal with sudo if it is a Linux) and: npm cache clean For npm 5 and later npm cache clean –force Edit: For windows you might fail to clean the cache, so you can remove the cache manually by deleting all the following folder content: C:\Users\<USER-NAME>\AppData\Roaming\npm-cache … Read more

Grunt on Windows 8: ‘grunt’ is not recognized

I’ve not had any issues with grunt on several different windows 8 machines. If you open the folder: C:\Users\[username]\AppData\Roaming\npm Do you have a file named grunt.cmd in this folder? If not I’d maybe try npm install -g grunt-cli again, maybe from an elevated command prompt. If this exists and you have C:\Users\[username]\AppData\Roaming\npm in your PATH … Read more

How to deploy node app that uses grunt to heroku

npm has a support for a postinstall step (among many others) that might be just what you’re looking for. The node.js heroku buildpack runs this command when you push to heroku to resolve build dependencies: $ npm install –production https://devcenter.heroku.com/articles/nodejs-support#build-behavior If you take a look at the npm documentation, you can setup a series of … Read more

What’s the difference between concat and uglify and minify?

Concatenation is just appending all of the static files into one large file. Minification is just removing unnecesary whitespace and redundant / optional tokens like curlys and semicolons, and can be reversed by using a linter. Uglification is the act of transforming the code into an “unreadable” form, that is, renaming variables/functions to hide the … Read more

What’s the purpose of gruntjs server task?

The server task is used to start a static server with the base path set as the web root. Example: Serve ./web-root as http://localhost:8080/: grunt.initConfig({ server: { port: 8080, base: ‘./web-root’ } }); It will function similar to an Apache server, serving up static files based on their path, but uses the http module via … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)