Commit Graph

318 Commits

Author SHA1 Message Date
Peter Bacon Darwin 45cbc430e8 chore(doc-gen): render decorators (annotations) for exported classes
Closes #3167
Closes #3221
2015-07-28 11:29:56 +01:00
Misko Hevery 78fdf9a11f fix(.d.ts): Correct new Type interface return type
Closes #2399
Closes #3316
2015-07-27 16:02:47 -07:00
Alex Eagle 19d8b221b4 fix(typings): test our .d.ts with --noImplicitAny
This matches how DefinitelyTyped tests it, so we are
one step closer to publishing the same file we generate.

See #3195
2015-07-24 11:24:44 -07:00
Peter Bacon Darwin 3c2b165de1 chore(doc-gen): add processor to check for unbalanced code fences (backticks)
See https://github.com/angular/angular/pull/3213/files#diff-da1eabc74e0bafaa56d2bfe4bc223b05R19
2015-07-23 09:35:03 +01:00
Peter Bacon Darwin 76f63bc6a5 chore(doc-gen/angular.io): check for not private rather is public
In 2e4a2a0e5a we removed the `@public` tags but the `addJadeDataDocsProcessor`
was still relying upon them being there to identify whether a doc should
be included in the public docs.

Instead we should just check for the doc not being marked with the
`@private` tag.

Closes #3212
2015-07-23 08:55:41 +01:00
Peter Bacon Darwin 4d80ce5b4a chore(doc-gen): add some tests for typescript-definition-package 2015-07-12 19:10:58 +01:00
Peter Bacon Darwin 09bb114a4d chore(doc-gen): convert heritage for private constructor classes
When we are creating a type definition file for a class has a private constructor,
we convert it to a combination of an instance of a concrete type with no constructor and an interface that contains the other methods.

When this happens, we must also convert the class's heritage from
`implements` to `extends` since interfaces cannot implement other interfaces
or classes.

Fixes a problem with #2996
Closes #3002
2015-07-12 18:53:31 +01:00
Peter Bacon Darwin 875db11822 chore(doc-gen): update dgeni-packages to 0.10.18
0.10.18 has fixed the `@private` tag so this is not needed locally any more
2015-07-11 07:21:46 +01:00
Peter Bacon Darwin 2e4a2a0e5a chore(doc-gen): remove unnecessary `@public` and `@exportedAs` tags 2015-07-11 07:21:46 +01:00
Peter Bacon Darwin 9fa7d38133 chore(doc-gen): put typescript stuff into its own package
This means that we can now run just the d.ts file generation by running:

```bash
gulp docs/typings
```

In addition the type definition generation was messing with the other docs tasks
so separating it also fixes problems there.
2015-07-11 07:21:45 +01:00
Peter Bacon Darwin 927454c8fa chore(doc-gen): don't use `string` module to stripTags
This module writes a file called `string` containing the text `testtest`
to the file system when it initialize.

See https://github.com/arturadib/shelljs/issues/212
2015-07-11 07:21:33 +01:00
vsavkin b54e7214f0 chore: removed angular2.api.ts
BREACKING CHANGE:

We export InjectMetadata instead of InjectAnnotation
2015-07-09 13:54:07 -07:00
Peter Bacon Darwin d050ce20a9 chore(doc-gen): fixup private constructor declarations
Closes #2883
2015-07-08 08:06:59 +02:00
Misko Hevery 12a427e158 fix(.d.ts): correct ComponentAnnotation inheritance
Closes #2356
2015-07-07 20:04:13 -07:00
Misko Hevery 0052c6b120 chore: improve angular2.d.ts file
- support ambient and import format for .d.ts
2015-07-07 20:04:13 -07:00
Peter Bacon Darwin 0e945e465d chore(doc-gen): stop crash in `gulp public_docs`
This change prevents the doc generation from crashing due to a missing module,
but perhaps we need to think of a way of being able to generate the angular.d.ts
file correctly in `gulp public_docs`, perhaps by removing the need for
angular2/angular2.api
2015-07-07 20:04:13 -07:00
Peter Bacon Darwin 72257ec87d chore(doc-gen): include type parameters in d.ts file
Closes #2859
2015-07-07 20:04:07 -07:00
Peter Bacon Darwin 355ced92eb chore(doc-gen): fix spacing in heritage clauses 2015-07-07 22:04:10 +01:00
Alex Eagle a56d33d7ca feat(typings): mark void methods in angular2.d.ts
Previously, when a return type was missing it
could have been any. But following #2746 we
require return types so remaining untyped returns
must be void.
2015-07-06 17:25:59 -07:00
Peter Bacon Darwin ad506a7aaa chore(doc-gen): render "call" and "new" members of interfaces correctly
Partially Closes #2849
2015-07-03 09:00:20 +01:00
Peter Bacon Darwin ef3cc8e6eb chore(doc-gen): render optional members correctly
Partially Closes #2849
2015-07-03 09:00:20 +01:00
Peter Bacon Darwin 561b78a5b3 chore(doc-gen): generate router typings file
Closes #2659
2015-07-03 08:58:36 +01:00
Alex Eagle a90063a827 chore(typing): restore some defn's now that dgeni is fixed
Closes #2446
Closes #2805
2015-07-01 12:53:10 +01:00
Alex Eagle 7a4a3c850f fix(typings): Minor issues preventing angular2.d.ts from working in TS 1.4.
This removes some, but not all, of the manual work needed to patch up our
.d.ts for pushing to DefinitelyTyped. Remaining manual steps are:
- some types still missing
- declaration of decorators
- remove destructuring args

See #2686.
2015-06-25 14:13:05 -07:00
Daria Jung 24646e7eb8 feat(typings): add typing specs
add test in gulpfile which will compile a basic TS file with generated
angular2.d.ts to ensure generated d.ts is valid syntactic TS

Adds support for enums in .d.ts generation pipeline.
Removes renaming reexports in http module.
2015-06-23 18:22:47 -07:00
Jacob Eggers dee0e008f5 chore(doc-gen): refactor versionInfo logic to new `git` dgeni-package
Closes #2444
2015-06-21 02:15:42 +01:00
Peter Bacon Darwin b8ef20e353 chore(doc-gen): ignore `@param` tags
At the moment we are not parsing param tags. This commit ignores them
completely.

TODO: hook up param descriptions with the actual param data in the doc.

Closes #2633
2015-06-19 12:10:01 -07:00
Peter Bacon Darwin 22f4cd26ae chore(doc-gen): remove redundant processors from angular.io generation 2015-06-19 19:08:34 +01:00
Jeff Cross 5b5ffe75d0 docs(Http): add docs for Http lib
Fixes #2442
2015-06-16 15:42:18 -07:00
Jeff Cross ea27704ea9 fix(docs): order class members in order of declaration
Previously, class members were ordered alphabetically.
This change leaves it up to the class author to
determine the order in which they would like
properties and methods to appear in class
documentation, without having to create methods like
`zUnimportantMethod`.

Fixes #2569
2015-06-16 15:21:54 -07:00
Peter Bacon Darwin 0c282e826a chore(doc-gen): ensure github links have the correct text 2015-06-15 21:59:52 +01:00
Jacob Eggers 8112b0baa7 chore(doc-gen): fix versionInfo population 2015-06-15 21:51:45 +01:00
Peter Bacon Darwin 14d28d7473 chore(doc-gen): fix id and alias generation for exports and members
This helps to ensure that links to exports are not confused with links
to members, which was causing some missing link issues.

Helps #2475
2015-06-15 00:11:59 +01:00
Peter Bacon Darwin 992293a196 chore(doc-gen): include `enum` in the export doc types
Fixes errors about missing "path templates" such as:

```
warn:    No path template provided - doc "ViewType" (enum)  - from file "angular2/src/render/api.ts"
warn:    No output path template provided - doc "ViewType" (enum)  - from file "angular2/src/render/api.ts"
```
2015-06-15 00:11:59 +01:00
Martin Probst a6e7123995 feat: adjust formatting for clang-format v1.0.19. 2015-06-12 09:51:57 -07:00
Jeff Cross 05d02fa90b fix(docs): ensure no duplicates in alias names of docs
Having multiple identical names in a doc's aliases would cause Ambiguous Link warnings
for each reference to one of the aliases.

Related to #2452
2015-06-11 17:52:13 -07:00
Rob Wormald 796fc66771 chore(build): rename .es6 files to .js
Change es6 source files in npm distribution to use .js extensions.

Closes #2447
2015-06-11 17:22:19 -07:00
Peter Bacon Darwin 659adf83dc chore(doc-gen): move typeParams and heritage rendering to template
Partially solves #2452
2015-06-11 19:15:17 +01:00
Peter Bacon Darwin efab03274f chore(doc-gen): autogenerate Angular version in angular.d.ts file 2015-06-10 12:42:24 +01:00
Peter Bacon Darwin f2e2ce15cd chore(doc-gen): add `type-alias` export doc type
See #2446
2015-06-10 12:14:10 +01:00
Peter Bacon Darwin 65cbcb2f73 chore(doc-gen): ensure `log` is injected into `getExportDocType`
See #2446
2015-06-09 23:07:35 +01:00
Alex Eagle 7141c15e65 fix(docs): Working generated angular2.d.ts
This requires some hacks, documented in
https://docs.google.com/document/d/1nNebWTiLzz5ePcit_bjZPtaiSIFU4EsQKUlX7LX0c0A/edit

Changes:
- include subtyping info in angular2.d.ts by adding 'extends supertype'
- export missing symbols needed transitively by angular2/angular2
- because of decorator/annotation mismatch, we can't export these to applications.
  So I've added a separate angular2.api.ts file to re-export specifically to .d.ts
  generation.
- Hack to remove aliases introduced by 'import * as alias' syntax
- Hack to deal with Error still an interface

note that we require users to install the transitive dependencies - this is how TSD works.
2015-06-05 15:33:23 -07:00
Alex Eagle f303f0c17a chore(docs): remove private members from angular2.d.ts 2015-06-02 17:15:49 -07:00
Peter Bacon Darwin 1fae8d6377 chore(doc-gen): add template for const docTypes 2015-06-02 15:30:03 -07:00
Naomi Black b746e0c9f0 docs(docgen): tell dgeni to use ts files and fix some bad links 2015-06-02 15:30:03 -07:00
Alex Eagle e67b7e87b2 chore(docs): Improve whitespace and semicolons in angular2.d.ts 2015-06-02 15:29:07 -07:00
Rado Kirov 0a0b84a07d fix(docs): generate d.ts file only for angular2/angular2. 2015-06-02 15:14:45 -07:00
Peter Bacon Darwin a504fa835e chore(doc-gen): improve github links to point to the correct tagged URL
Closes #1994
2015-06-02 10:56:23 +01:00
Peter Bacon Darwin f6eeb9aa66 chore(doc-gen): dgenerate the type definition file for angular2
Closes #2017
Closes #1966
2015-05-20 12:23:59 +01:00
Peter Bacon Darwin cd7aef2139 chore(doc-gen): fix up tests to work on linux 2015-05-19 14:38:11 +01:00
Peter Bacon Darwin 50c6efa187 chore(doc-gen): fix paths for links to modules and exports 2015-05-19 14:38:10 +01:00
Peter Bacon Darwin 302c5d5005 chore(doc-gen): paths now start with a slash 2015-05-19 14:38:10 +01:00
Peter Bacon Darwin b6b9ede425 chore(doc-gen): include interfaces in the possible exports from a module 2015-05-19 14:38:10 +01:00
Peter Bacon Darwin 118f0520a2 chore(doc-gen): get CompilerHost to return the SourceFiles with the correct fileName
Now that we are not changing the working directory, we needed to update how
getSourceFiles works to ensure that it worked relative to the baseDir.
2015-05-19 14:38:10 +01:00
Peter Bacon Darwin ba80bd43ad chore(doc-gen): fix text mock code 2015-05-19 14:38:10 +01:00
Peter Bacon Darwin ed6298c33f chore(doc-gen): speed up class member sorting 2015-05-19 14:38:10 +01:00
Peter Bacon Darwin db5486a347 chore(doc-gen): use actual TypeScript SymbolFlags enum rather than magic number 2015-05-19 14:38:10 +01:00
Peter Bacon Darwin b9b58f7ed9 chore(doc-gen): speed up class member sorting 2015-05-19 14:38:10 +01:00
Peter Bacon Darwin 33f5aafd6c chore(doc-gen): formatting 2015-05-19 14:38:09 +01:00
Peter Bacon Darwin 4b34ef9036 chore(doc-gen): remove unused `signature` 2015-05-19 14:38:09 +01:00
Peter Bacon Darwin 8c409e9251 chore(doc-gen): improve error handling for missing declaration params 2015-05-19 14:38:09 +01:00
Peter Bacon Darwin 398e70ad39 chore(doc-gen): allow class member sorting to be configured 2015-05-19 14:38:09 +01:00
Peter Bacon Darwin 9407c12923 chore(doc-gen): clarify and improve matching of exports to ignore
Previously this was a bit cryptic as we just had a `hideSpecialExports` flag.
Now it ignores exports that match an array of regexes, with the default case
being those exports called `___esModule`.
2015-05-19 14:38:09 +01:00
Peter Bacon Darwin a4693ef679 squash-me: remove unnecessary (and very naughty) `chdir()` call 2015-05-19 14:38:09 +01:00
Peter Bacon Darwin 9d5f760597 chore(doc-gen): chore(doc-gen): add TypeScript parsing 2015-05-19 14:38:09 +01:00
Peter Bacon Darwin 8bebcfb844 chore(doc-gen): relax link matching 2015-05-19 14:38:09 +01:00
Peter Bacon Darwin 8a0eb08745 chore(doc-gen): relax link matching 2015-05-19 14:38:08 +01:00
Peter Bacon Darwin 1dce4699de chore(doc-gen): relax link matching 2015-05-19 14:38:08 +01:00
Peter Bacon Darwin 7bff919782 chore(doc-gen): add TypeScript parsing 2015-05-19 14:38:08 +01:00
Peter Bacon Darwin c6dc78183d chore(doc-gen): relax link matching 2015-05-19 14:38:08 +01:00
Peter Bacon Darwin 9a72f19b97 chore(doc-gen): add TypeScript parsing 2015-05-19 14:38:08 +01:00
Peter Bacon Darwin 25a952755e chore(doc-gen): remove Traceur bits 2015-05-19 14:38:08 +01:00
Peter Bacon Darwin b2da2978ee chore(doc-gen): move inline link matching to dgeni-package 2015-05-19 14:38:07 +01:00
Peter Bacon Darwin 72bb5bdd5a chore(doc-gen): fix path to modules on angular.io 2015-05-19 14:38:07 +01:00
Jeremy Elbourn 62bf777ef1 fix(docs): fix broken docs test after addition of .ts extension to dgeni
regex.
2015-05-07 14:05:57 -07:00
Peter Bacon Darwin e30ad2ec2c chore(doc-gen): include TypeScript files in the doc generation 2015-05-07 10:26:23 +01:00
Peter Bacon Darwin c509057f65 chore(doc-gen): log comments as silly() rather than info() 2015-05-07 10:25:41 +01:00
Peter Bacon Darwin e138add584 chore(doc-gen): provide aliases for jade-data docs 2015-05-07 10:25:02 +01:00
Alex Wolfe 3f28d08778 build bug fix 2015-05-06 15:53:58 -07:00
Alex Wolfe ab28676d02 more comments 2015-05-06 15:36:02 -07:00
Peter Bacon Darwin 902984cc10 chore(doc-gen): only generate angular.io module and _data docs for public modules 2015-04-28 14:54:47 +01:00
Peter Bacon Darwin ce431f279e chore(doc-gen): don't show private class members in jade templates
Closes #1366
2015-04-28 14:47:38 +01:00
Alex Wolfe c269bd5d3c chore(doc-gen): generate docs for angular.io
You can generate docs for comsumption by the angular.io website by running:

```bash
gulp docs/angular.io
```

The generated docs can be found in `dist/angular.io`
2015-04-28 14:31:34 +01:00
Marc Laval 0a200aff70 chore(doc-gen): fix atScript file reader test
Closes #1458
2015-04-20 17:43:46 +02:00
Peter Bacon Darwin fbd6851860 chore(doc-gen): add ids to members to allow direct linking
You can now write a link to a member of a class by appending the member name
to the class name joined by a hash sign:

```
{@link ControlGroupDirective#addDirective `addDirective`}
```

By default the link will contain the text of the class rather than the member
so you must add it as an inline code text snippet in the link tag.

Closes #1432
2015-04-18 22:06:49 +01:00
Peter Bacon Darwin 376d508934 chore(doc-gen): read `.es6` files as well as `.js` when generating docs
Closes #1429
2015-04-18 08:35:38 +01:00
Peter Bacon Darwin e1b0bab9a6 chore(doc-gen): ignore members marked with `@private` 2015-04-17 16:24:07 +01:00
Peter Bacon Darwin a8533b2133 chore(doc-gen): add link inline tags
This commit enables links to other docs, such as classes and modules,
via the `{@link CodeIdentifier}` style inline tag.

Dgeni identifies what you are linking to by comparing the identifier to the
aliases for each doc. If no alias matches the identifier then the dgeni
run exits with a missing doc in link error. If more than one alias matches
the identifier then dgeni exits with an ambiguous link error.

In the future we could build in some heuristics for choosing a preferred
doc when the link is ambiguous, such as choosing a public doc over a
non-public doc; and choosing a code component that is in the same module as
the doc where the link is found.

Currently there are two aliases for each API component: its name and its
identier. For example, if the `Directive` class is exported from
`angular2/annotations`, so its aliases are 'Directive' and
`angular2/annotations.Directive`.

There is an issue in the non-public doc generation, which means that it
does not yet have `{@link}` tags implemented. This is that when we re-export
a code component, it gets cloned into another module. This means that a
simple reference to the code component's name will always produce an
ambiguous link. This can be fixed with a heuristic as described above.
Meanwhile you can avoid this by always using the full id of the code
component if it is being re-exported.

Closes #1371
Closes #1421
2015-04-17 14:02:03 +01:00
Peter Bacon Darwin 0658d5602e chore(doc-gen): ignore exports marked as @private
Closes #1363
2015-04-15 19:50:01 -07:00
Peter Bacon Darwin 896a1564ef chore(doc-gen): only clone docs that are actually being re-exported to a new module
Closes #1353
2015-04-14 13:20:49 +01:00
Peter Bacon Darwin b5002fb46b docs(test_lib/test_injector): fix invalid jsdoc type
chore(doc-gen): capture docs for modules from comments

Closes #1258

docs(*): add module description jsdoc tags
docs(*): add @public tag to public modules
chore(doc-gen): fix overview-dump template
The template was referencing an invalid property
chore(doc-gen): use `@exportedAs` and `@public` rather than `@publicModule`

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.

docs(*): rename `@publicModule` to `@exportedAs`

The `@publicModule` dgeni tag has been replaced by the `@exportedAs`
dgeni tag on components that are to be re-exported on another module.

Closes #1290
2015-04-10 22:00:41 +00:00
Peter Bacon Darwin 9f8a9c6fc7 chore(doc-gen): ensure all public exports are rendered in public_docs
Closes #1222
2015-04-08 18:58:44 +02:00
Peter Bacon Darwin 105ba30ce9 chore(doc-gen): improve method signature formatting
Re-use the preformatting from the source code to layout method signatures
more cleanly.
2015-04-08 17:11:34 +02:00
Peter Bacon Darwin ee8bf0b3c0 chore(doc-gen): HTML escape method signatures
Closes #1249
Closes #1257
2015-04-08 17:11:34 +02:00
Peter Bacon Darwin 1a99090b45 chore(doc-gen): don't show Members heading if no members
Closes #1248
2015-04-07 09:23:19 +02:00
Peter Bacon Darwin 27c6afbeb4 chore(doc-gen): add temporary dump of all API docs
Remove unwanted < character
2015-04-01 10:24:33 +01:00
Peter Bacon Darwin adab6c0728 chore(doc-gen): add temporary dump of all API docs
Accessible at `angular/dist/public_docs/overview-dump.html`
2015-03-31 22:12:41 +01:00
Peter Bacon Darwin 609201e109 chore(doc-gen): add method signatures to members and functions
Closes https://github.com/angular/dgeni/issues/124
2015-03-31 22:12:41 +01:00
Caitlin Potter 9d21a6f40d chore(package.json): upgrade traceur to v0.0.87
Fix in source-map test to follow through the sourcemap chain.
2015-03-26 18:37:03 -07:00
Victor Berchet 3ce0f1146f chore(dgeni): set log level to 'warning' 2015-03-26 09:31:36 +01:00
Peter Bacon Darwin c686e7ea30 chore(doc-gen): ignore non-jsdoc style comments
Now the visitor will find the last jsdoc style comment (e.g. `/** jsdoc comment */`)
before the current code item, ignoring any inline style comments (e.g. `// inline comment`)
in between.

Closes #1072
2015-03-24 11:25:58 +00:00
Peter Bacon Darwin 7e89af8190 chore(doc-gen): move `@publicModule` tag-def to base package
This prevents unwanted "unknown tag" warnings when generating the non-public docs.
2015-03-24 10:57:42 +00:00
Peter Bacon Darwin 539e8e2cce chore(doc-gen): add specific template for displaying variable exports
Closes #1071
2015-03-24 10:57:42 +00:00
Peter Bacon Darwin 0f20c39f42 chore(doc-gen): include exported variable declaration in public docs 2015-03-19 22:26:51 +00:00
Peter Bacon Darwin 6cdbe4a264 chore(doc-gen): fix AttachCommentTreeVisitor
In the case that there were more than one comment blocks preceding a block of
code, the visitor was only attaching the first comment. Really what we
should do is to attach the last comment before the code block.
2015-03-18 18:00:04 +00:00
GabrielBico 1872b03fb8 style(docs/app): remove commented code
Closes #984
2015-03-17 22:09:03 +00:00
Peter Bacon Darwin 85799aa1a5 docs(*): add `@publicModule` tags
Initial set of tags to demonstrate the public docs filtering

Closes #988
2015-03-17 14:44:45 -07:00
Peter Bacon Darwin f503c1e9e6 chore(doc-gen): add new "public" docs configuration 2015-03-17 14:44:45 -07:00
Peter Bacon Darwin ede7690be3 chore(doc-gen): track modules in a dgeni service 2015-03-17 14:44:44 -07:00
Tobias Bosch e490861ba2 fix(docs): make them run again and integrate into ci 2015-02-26 15:38:12 -08:00
Peter Bacon Darwin 3d12d08f8a chore(docs): add a processor to get the name of a guide doc from its markdown 2015-02-17 08:08:47 +00:00
Peter Bacon Darwin 4aa0dffca1 chore(docs): use the name rather than the id for the title of guide docs 2015-02-17 08:08:47 +00:00
Peter Bacon Darwin 8e494396d9 chore(docs): module paths must have explicit .js extension
Traceur 0.80 had a breaking change in the path to modules. Previously
there was an implicit .js extension added but this must now be explicit.
2015-01-09 11:41:01 +00:00
Essam Al Joubori 45008884e4 Add semicolon to generateNavigationDoc.js 2015-01-06 18:16:28 -08:00
Peter Bacon Darwin b4772fc79b chore(docs): refactor traceur usage 2014-12-06 11:33:53 +00:00
Peter Bacon Darwin 94b541a3e8 chore(docs): add code prettification
Closes #285
2014-12-06 11:26:09 +00:00
Tobias Bosch 8db77f2405 refactor(build): simplify and modularize
simplify:
- use same html file for dart and JS
- build benchmarks automatically when doing `gulp build`
- centralize configuration

modularize:
- move all build tasks into separate node.js modules under
  `tools/build`.

changes:
- the `build` folder is now the `dist` folder

Closes #284
2014-12-05 16:30:36 -08:00
Peter Bacon Darwin 27e03591dd chore(docs): initial dgeni docs generation
Closes #261
2014-12-04 14:17:08 +00:00