How do I manage relative path aliasing in multiple grunt-browserify bundles?

Simple answer: The simplest is to use the paths option of browserify. I use it for some months with great success. I have even made a starter kit that uses this feature: https://github.com/stample/gulp-browserify-react-phonegap-starter var b = browserify(‘./app’, {paths: [‘./node_modules’,’./src/js’]}); paths – require.paths array to use if nothing is found on the normal node_modules recursive walk … Read more

Are you supposed to link to bower_components in production?

are you using Yeoman? Depending on your Gruntfile.js you should have different tasks, one of these is ‘bower-install’: this task will read you index.html, find the following comment block <!– bower:js –> <!– endbower –> and inject inside it all your dependencies specified in your bower.json. This means that the task will write for your … Read more

and variables for a gruntfile

Where do those variables get derived from? Starting broadly, read the Gruntfile example as it starts to address the <%= variable %> syntax. If you are new to Grunt, bookmark that page as there’s stuff there that doesn’t seem important at first but will be useful on repeated reading. More specifically, yeah…those are from a … Read more

How to use grunt-contrib-livereload?

Live reloading is now built into grunt-contrib-watch version 0.4.0. grunt-contrib-livereload and grunt-regarde will be deprecated soon. Now just set the option livereload to true in your config and it will create a live reload server then reload after the tasks have run: grunt.initConfig({ watch: { all: { options: { livereload: true }, files: [‘lib/*.js’], tasks: … Read more

How can I rename files with Grunt, based on the respective file’s parent folder name?

This can be done using the grunt-contrib-copy plugin. The main thing to note is that you can change the destination programmatically by using a rename function (which takes in the destination and source of each file). Here is a (somewhat brittle) sample Gruntfile.js that should copy to your desired structure: module.exports = function(grunt) { // … Read more

How to uninstall npm package?

To uninstall a npm module from project node_modules folder, run: npm uninstall <module> –save Note that npm modules should be uninstalled from the same directory that contains the node_modules folder when running this command. The –save option will also remove it from your package.json One can also remove a local dependency/module installation, by deleting its … Read more

No provider for “framework:jasmine”! (Resolving: framework:jasmine)

I had the same error after creating a new project the yeoman angular generator (yo angular). The solution for me was adding “karma-jasmine” to the devDependencies in packages.json and running “npm install” again. npm install karma-jasmine –save-dev This solved the error message “No provider for “framework:jasmine”!” I also had to add a karma browser launcher … Read more

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