Skip to content

Conversation

@raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented Jan 21, 2018

Doc updates for @loopback/context.

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Nice!


A few variants of `@inject` are provided to declare special forms of dependencies:

- @inject.getter: inject a getter function that returns a promise of the bound value of the key
Copy link
Member

Choose a reason for hiding this comment

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

Missing backticks?

 - `@inject.getter`: inject a getter function etc.

}
```

- @inject.setter: inject a setter function to set bound value of the key
Copy link
Member

Choose a reason for hiding this comment

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

Missing backticks?

 - `@inject.setter`: inject a setter function etc.

}
```

- @inject.tag: inject an array of values by a pattern or regexp to match bindng tags
Copy link
Member

Choose a reason for hiding this comment

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

ditto - missing backticks

summary: A tutorial to use `@loopback/metadata` module to create new decorators
---

[Create decorators](https://github.com/strongloop/loopback-next/blob/master/packages/metadata/README.md)
Copy link
Member

Choose a reason for hiding this comment

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

An empty page with a single link to external README is suboptimal. Could you please use the mechanism we have already in place for sourcing content from README files?

See http://loopback.io/doc/en/contrib/Including-READMEs.html and http://loopback.io/doc/en/contrib/readmes.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was trying to do so but the current tooling does not seem to support a monorepo (loopback-next).

Copy link
Member

Choose a reason for hiding this comment

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

the current tooling does not seem to support a monorepo (loopback-next).

Could you please be more specific? What is the current problem and how much work would it be to fix it? If you prefer to land this PR first, then I am ok with that as long as there is a follow-up issue so that we don't forget to fix this problem.

Copy link
Member

Choose a reason for hiding this comment

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

Is this discussion actually relevant, considering 7e95ae0 and 934c889?

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Assuming that the new script update-v4-readmes.sh works as intended, you need to update Jenkinsfile to fetch these new READMEs and commit them to github.

Other than that, the patch LGTM.

@raymondfeng
Copy link
Contributor Author

@bajtos I added v4 readme steps in Jenkinsfile. I'll merge the PR to see it works as expected as I cannot tell it locally.

@raymondfeng raymondfeng merged commit 38f961c into gh-pages Jan 25, 2018
@raymondfeng
Copy link
Contributor Author

For the record, http://loopback.io/doc/en/lb4/Creating-decorators.html is live now. :-)

@raymondfeng raymondfeng deleted the improve-context-docs branch January 26, 2018 03:13
@bajtos
Copy link
Member

bajtos commented Jan 26, 2018

For the record, http://loopback.io/doc/en/lb4/Creating-decorators.html is live now. :-)

👏

There is one glitch to fix though: the note "This page was generated from the metadata README." is pointing to a wrong GitHub URL: https://github.com/strongloop/metadata

Ideally, the note should say @loopback/metadata instead of metadata, and point to loopback-next's packages/metadata directory.

@raymondfeng ☝️

raymondfeng added a commit that referenced this pull request Feb 6, 2018
raymondfeng added a commit that referenced this pull request Feb 7, 2018
raymondfeng added a commit that referenced this pull request Feb 7, 2018
raymondfeng added a commit that referenced this pull request Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants