doc: Add usage on the 'atom' protocol URL.

This commit is contained in:
Cheng Zhao
2013-09-14 14:34:00 +08:00
parent 1b4be18dd7
commit 0a8d9bdad5

View File

@@ -214,6 +214,19 @@ your grammar supports:
]
```
## Bundle External Resources
It's common to ship external resources like images and fonts in the package, to
make it easy to reference the resources in HTML or CSS, you can use the `atom`
protocol URLs to load resources in the package.
The URLs should be in the format of
`atom://package-name/relative-path-to-package-of-resource`, for example, the
`atom://image-view/images/transparent-background.gif` would be equivablent to
`~/.atom/packages/image-view/images/transparent-background.gif`.
You can also use the `atom` protocol URLs in themes.
## Writing Tests
Your package **should** have tests, and if they're placed in the _spec_ directory,