Gulp Angular Filesort

screenshot of Gulp Angular Filesort

Automatically sort AngularJS app files depending on module definitions and usage

Overview

Gulp-angular-filesort is a useful tool for developers working with AngularJS applications, ensuring that the application files are automatically sorted according to their module definitions and usage. This sorting is crucial for preventing the common "Uncaught Error: [$injector:modulerr]" that can arise from improperly ordered scripts. Although the tool serves a specific purpose, there's a strong recommendation to consider alternatives like Browserify or Webpack for newer applications.

This plugin integrates seamlessly with gulp-inject, allowing for efficient file injection into your AngularJS app. By correctly organizing files, gulp-angular-filesort helps streamline the development process, making file management simpler and more reliable.

Features

  • Automatic File Sorting: Sorts AngularJS app files based on their module definitions and usage, reducing errors during app execution.

  • Integration with Gulp: Works in conjunction with gulp-inject to facilitate the correct injection of scripts into your application.

  • Prevention of Common Errors: Helps eliminate the common "Uncaught Error: [$injector:modulerr]" by ensuring files are ordered correctly.

  • Syntax Requirement: Each AngularJS file must have a uniquely named module with the correct setter syntax to function properly.

  • Easy Installation: Simple to add as a development dependency in your existing Gulp setup.

  • MIT License: Open-source license allows for free use and modifications, promoting community contributions.

  • Not for New Apps: Strong recommendation against use in new projects, suggesting alternative tools like Browserify or Webpack for better long-term solutions.