How to configure Gruntfile / Yeoman to scaffold over function-oriented directory structure

When creating a new project using the Yeoman angularJS (yo angular) generator, the application is initialized with the following directory structure:

  • attachment
    • Scenarios
      • Controllers
        • aFeatureController
        • bFeatureController
      • directives
        • aFeatureDirective
        • bFeatureDirective
    • Views
      • aFeatureView
      • bFeatureView

Despite the fact that this traditional MVC structure works well, it becomes more difficult for me to navigate than a functionally oriented structure, where all files belonging to the same section of the application live under one roof. In other words, I would like to have the following structure:

  • attachment
    • aFeature
      • aFeatureController
      • aFeatureDirective
      • aFeatureView
    • bFeature
      • bFeatureController
      • bFeatureDirective
      • bFeatureView

grunt Yeoman, , Yeoman ?

+4
1

angular yoman .

, , ( ), , generator-cg-angular.

, . , , angular . , .

+1

Source: https://habr.com/ru/post/1534872/


All Articles