Skip to content

Conversation

@petebacondarwin
Copy link
Contributor

@naomiblack and @mhevery

  • this PR fixes the module documentation issue. Now you can provide a jsdoc style comment block at the top of the module definition file that must include the @module tag to indicate that it documents the module rather than code components exported from the module. Also you now specify that a module is or public consumption by applying the @public tag on the module itself. For example:
/**
 * @module
 * @public
 * @description
 * This block contains markdown that describe this module.
 */

The other major change in this PR is that the @publicModule tag has been replaced with the @exportedAs tag, which can be applied multiple times to a single code component. What this implies is that the associated code component has also been exported on other modules.

Closes #1258

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the rename? I think publicModule is a better name. Can you share your thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be exportedAs

@mhevery mhevery added the @lgtm label Apr 10, 2015
@mhevery
Copy link
Contributor

mhevery commented Apr 10, 2015

Rename exportedFrom to exportedAs

@petebacondarwin
Copy link
Contributor Author

The reason for the rename is that it no longer puts the onus on the exported component to tell that the module is public. This is also considerably more flexible as it allows modules that only contain direct exports and not reexports to be public. Also it allows items to be decl

@petebacondarwin
Copy link
Contributor Author

Phone finger slippage...

Also it allows components to be reexported internally too for the private docs

@petebacondarwin
Copy link
Contributor Author

Regarding the naming...

The tag is attached to a component that is an export on a private module. The tag declares that this component is also exported from another module. Exported as implies that a module is being aliased, which is not accurate.

But if you are sure you want it that way then I can change it.

@mhevery
Copy link
Contributor

mhevery commented Apr 10, 2015

I think exportedAs is still right. As it is being aliased.
It will be available from two places, it is just that we will not publish the original place.

The template was referencing an invalid property
…odule`

This commit refactors how we describe components that are re-exported in another
module. For example the "public" modules like `angular/angular` and `angular/annotations`
are public but they only re-export components from "private" modules.

Previously, you must apply the `@publicModule` tag to a component that was to be
re-exported. Applying this tag caused the destination module to become public.

Now, you specify that a module is public by applying the `@public` tag and then
you can "re-export" components to other modules by applying the `@exportedAs`
giving the name of the module from which the component will be re-exported.
tag. This tag can be used multiple times on a single component, allowing the
component to be exported on multiple modules.
The `@publicModule` dgeni tag has been replaced by the `@exportedAs`
dgeni tag on components that are to be re-exported on another module.
@petebacondarwin petebacondarwin changed the title Fix Docs for Modules and Refactor @publicModule tag to @exportedFrom Fix Docs for Modules and Refactor @publicModule tag to @exportedAs Apr 10, 2015
@petebacondarwin
Copy link
Contributor Author

@mhevery - updated with @exportedAs. Feel free to get someone to merge once the rename PR has gone in.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dgeni output: need a way to provide a description at the module level

4 participants