aurelia / router

A powerful client-side router.
MIT License
120 stars 115 forks source link

refactor(all): better discover-ability, files re-org #633

Closed bigopon closed 5 years ago

bigopon commented 5 years ago

This PR focuses on re-organizing files and classes to make it easier to discover. Along with linting fixes and big function breakdown, such as _buildNavigationPlan in navigation-plan.ts

Another refactoring target was to have more local variables over long property chain access with verbose name, this should help greatly with minification.

After this, the focus will be fixing bug and incorporating existing PRs

@EisenbergEffect @davismj @fkleuver

Also add an overload for NavigationInstruction.prototype.addViewPortInstruction to accept an options object, to open a path for future feature related to static view model. It looks like this

  /**
   * Adds a viewPort instruction. Returns the newly created instruction based on parameters
   */
  addViewPortInstruction(initOptions: ViewPortInstructionInit): /*ViewPortInstruction*/ any;
  addViewPortInstruction(viewPortName: string, strategy: ActivationStrategyType, moduleId: string, component: any): /*ViewPortInstruction*/ any;
  addViewPortInstruction(
    nameOrInitOptions: string | ViewPortInstructionInit,
    strategy?: ActivationStrategyType,
    moduleId?: string,
    component?: any
  ): /*ViewPortInstruction*/ any;
EisenbergEffect commented 5 years ago

@bigopon I'm confused as to why we're still targeting master and not develop.

bigopon commented 5 years ago

@EisenbergEffect i forgot that. Switched target

EisenbergEffect commented 5 years ago

Excellent. Thanks! @bigopon Is there also a templating-router PR we need to merge for that release? Is it targeting the correct branch?

bigopon commented 5 years ago

The PR is here https://github.com/aurelia/templating-router/pull/88 .

EisenbergEffect commented 5 years ago

Thank you :)