Articles for February 2016 – Offline installation of npm packages

Occasionally, you may need to install npm packages while offline. This could be due to a flaky network connection, being on a flight or during a workshop. Getting this working has been a dream for a while.

They say you should follow your dreams. Unless it’s been a while and they haven’t followed you back, in which case unfollow them and move on. Luckily, there are a few options available to get npm working offline today.

Addy Osmani is a web tooling engineer at Google working with the Chrome team. He is author of open-source projects like Yeoman and books like Learning JavaScript Design Patterns (O’Reilly).

Source: – Offline installation of npm packages

AngularJS: Developer Guide: Components

In Angular, a Component is a special kind of directive that uses a simpler configuration which is suitable for a component-based application structure.

This makes it easier to write an app in a way that’s similar to using Web Components or using Angular 2’s style of application architecture.

Advantages of Components:

  • simpler configuration than plain directives
  • promote sane defaults and best practices
  • optimized for component-based architecture
  • writing component directives will make it easier to upgrade to Angular 2

When not to use Components:

  • for directives that rely on DOM manipulation, adding event listeners etc, because the compile and link functions are unavailable
  • when you need advanced directive definition options like priority, terminal, multi-element
  • when you want a directive that is triggered by an attribute or CSS class, rather than an element

Source: AngularJS: Developer Guide: Components