Skip to content

Conflicting package-lock.json in Git?

30-Oct-18

Include package-lock.json in your git repository, but try to commit it alone (to avoid noise in diffs).

When encountering conflicts during merge:

npm install --package-lock-only

As running that command then suggests, you might also want to consider automating the process by installing npm-merge-driver (npx npm-merge-driver install -g).

Cancel Conflicting Git Merge (--ABORT)

30-Oct-18

Your keyword here isĀ abort.

git merge --abort

Install version of an NPM module: module-name@1.0.0-alpha

22-Aug-18

Installing specific version with npm by usingĀ npm install [--save-dev] module-name@1.0.0-alpha

New in JavaScript ES6

24-Jul-18

ES6 introduces new operators and concepts, like spread operator and Sets.

Introduction to ES6+

Disable autocomplete automatically for all forms in AngularJS

13-Jun-18

When developing CRMs autocomplete is often useless or altogether detrimental. If you end up having a case where no element will ever need autocomplete, one of the fastest ways to achieve this is hooking an AngularJS directive to the form element:

(function() {
  'use strict';

  angular
    .module('app.core')
    .directive('form', htmlFormDirective);

  function htmlFormDirective() {
    return {
      restrict: 'E',
      compile: function(elem, attrs) {
        elem[0].setAttribute('autocomplete', 'off');
      }
    };
  }

})();