mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
doc: Add usage on the 'atom' protocol URL.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user