-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Launch Manual V2 Skeleton #172
base: main
Are you sure you want to change the base?
Changes from 28 commits
26bcc95
7f95b6c
077ff90
93ba224
72b8c30
936d70d
2aba647
310da84
dc789fc
308028d
dece773
6a59cba
b87a9d0
d4699f9
b8bb671
0d212bc
fbc0c69
b8fcb8e
0e9af20
947fae6
58ce937
35ad982
fd7758f
a5b7b64
edce353
ba84d97
f51d4bd
913b4ac
0f4803b
8ed0b64
d7eb53e
c304afa
4763393
1a733ed
1f1eb16
ece7baf
1556307
96a558e
2fd2e26
34ec523
18730d4
4d67fcb
ee57d91
62d4bb7
e4889b1
24b85cd
2f3ff48
f258bd5
8026838
4ea85ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Launch Manual v2 | ||
--- | ||
|
||
Here you will find version 2 of the Launch Manual. It's a redesigned and reimagined way to browse and read our documentation with the goal of being easier to understand, skim, and consume. | ||
|
||
Currently this page is not linked on the sidebar, as it is nowhere near complete. But if you've found the page by accident, feel free to click onto the standard Launch Manual on the sidebar as the documentation there is complete. | ||
|
||
|
||
## [Pulsar Package Registry Frontend Website](/docs/launch-manual-v2/sections/ppr-frontend) | ||
|
||
Guide to using the Pulsar Package Registry, where you can manage your Pulsar user account and browse the available packages for Pulsar from any device on the web. | ||
|
||
## [Authoring Pulsar Packages](/docs/launch-manual-v2/sections/authoring-packages) | ||
|
||
Authoring Pulsar Packages will walk you through the basics of creating your Pulsar Packages and Publishing them to the Pulsar Package Registry. This is where you should go if you'd like to become one of the amazing community members to publish and maintain a package for everyone to use. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
lang: en-US | ||
title: Authoring Pulsar Packages | ||
description: Creating and Publishing Packages for Pulsar Package Registry | ||
--- | ||
|
||
A huge part of Pulsar is made up of bundled and community-made packages. If you wish to add some functionality to Pulsar, you have access to the same APIs and tools that were used to build Pulsar itself. From the [tree-view](https://github.com/pulsar-edit/tree-view) to the [command-palette](https://github.com/pulsar-edit/command-palette) functionality — most core features of Pulsar are implemented as packages. | ||
|
||
In this section we will cover how to extend the functionality of Pulsar through writing packages. Packages can do a number of things: change the user interface, add a new theme, add a grammar for a language, and more. We'll learn this by writing a series of increasingly complex packages together, introducing you to new APIs, tools, and techniques as we need them. | ||
|
||
We'll then take a look at how we can get new packages published to the Pulsar Package Registry using the built-in tool `ppm`. | ||
|
||
--- | ||
|
||
If you are just jumping in, here are some resources you may want to keep handy to get yourself familiar with the other parts of Pulsar we'll be using. | ||
|
||
- [Pulsar Package Registry API]() | ||
- [Pulsar Editor API]() | ||
- [Using PPM]() | ||
|
||
--- | ||
|
||
::: details Sections | ||
|
||
- [Publishing a Package](#publishing-a-package) | ||
|
||
::: | ||
|
||
@include(sections/publishing-a-package.md) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
## Publishing a Package | ||
|
||
Pulsar bundles a command line utility called `ppm` which we first used back in [Command Line](../../../using-pulsar/#command-line) to search for and install packages via the command line. This is invoked by using the `pulsar` command with the `-p` or `--package` option. The `pulsar -p` command can also be used to publish packages to the Pulsar Package Registry and to update them. | ||
|
||
See more in the [PPM Docs]() section. | ||
|
||
### Prepare Your Package | ||
|
||
There are a few important things to double check before publishing your package: | ||
|
||
- Your `package.json` file has a `name`, `description`, and `repository` fields. | ||
This comment was marked as resolved.
Sorry, something went wrong.
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Your `package.json` `name` field is URL-safe — for instance, it doesn't include any emoji or other special characters. | ||
- Your `package.json` `version` field is [Semver V2](https://semver.org/spec/v2.0.0.html) compliant. | ||
- Your `package.json` `engines` field contains an entry for `atom` such as: `"engines": { "atom": ">=1.0.0 <2.0.0"}`. | ||
- Your package has a `README.md` file at its root. | ||
- Your `repository` URL in the `package.json` file is the same as the URL of your repository on GitHub. | ||
- Your package is in a git repository that has been pushed to [GitHub](https://github.com). Follow [this guide](https://help.github.com/articles/importing-a-git-repository-using-the-command-line/) if your package isn't already on GitHub. | ||
|
||
### Publishing Your Package | ||
|
||
Before you publish a package, it's a good idea to check ahead of time if a | ||
package with the same name has already been published to | ||
[the Pulsar Package Repository](https://web.pulsar-edit.dev/packages). You can | ||
do that by visiting `https://web.pulsar-edit.dev/packages/[your-package-name]` to | ||
see if the package already exists. If it does, update your package's name to | ||
something that is available before proceeding. | ||
|
||
Now let's review what the `pulsar -p publish` command does: | ||
|
||
1. Registers the package name on Pulsar Package Repository if it is being | ||
published for the first time. | ||
2. Updates the `version` field in the `package.json` file and commits it. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tbh idk what exactly the update is. patch, minor, or major, or is this about the database somehow? Edit: Oh this is answered below. This isn't really a review since it comes before the information. Maybe replace with a summary, or move after the info? |
||
3. Creates a new [Git tag](https://git-scm.com/book/en/Git-Basics-Tagging) for | ||
the version being published. | ||
4. Pushes the tag and current branch up to GitHub. | ||
5. Updates Pulsar Package Repository with the new version being published. | ||
|
||
Now run the following commands to publish your package: | ||
|
||
```sh | ||
$ cd path-to-your-package | ||
$ pulsar -p publish minor | ||
``` | ||
|
||
If this is the first package you are publishing, the `pulsar -p publish` command may prompt you for your GitHub username and password. If you have two-factor authentication enabled, use a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) in lieu of a password. This is required for `ppm` to automatically manage and push tags to your package's GitHub repo and is needed only during the first time publishing. The credentials are stored securely in your [keychain](<https://en.wikipedia.org/wiki/Keychain_(software)>) once you login. | ||
|
||
Additionally if this is your first time publishing to the Pulsar Package Registry, you also need to provide PPM an API token to access your Pulsar User Account. If you don't have a Pulsar User Account already, you'll need to make one on the [Pulsar Website](https://web.pulsar-edit.dev/login). You can learn more about creating an account on the [Pulsar Website Docs](). Once you have successfully created an account copy the API token available on your user page and use `pulsar -p --login <YOUR_PULSAR_API_TOKEN>` to give PPM your API Key. Again just like your GitHub credentials this API Key is stored securely in your [keychain](<https://en.wikipedia.org/wiki/Keychain_(software)>). | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Now your package is published and available on the Pulsar Package Registry. Head on over to `https://web.pulsar-edit.dev/packages/[your-package-name]` to see your package's page. | ||
|
||
With `pulsar -p publish`, you can bump the version and publish by using | ||
|
||
```sh | ||
$ pulsar -p publish <version-type> | ||
``` | ||
|
||
where `version-type` can be `major`, `minor`, and `patch`. | ||
|
||
- **MAJOR** version when you make incompatible API changes. | ||
- **MINOR** version when you add functionality in a backwards compatible manner. | ||
- **PATCH** version when you make backwards compatible bug fixes. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reminds me of this one rust comment. maybe this formulation is simpler: major - upgrading breaks There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While that might be a bit simpler, the text taken here iirc is taken directly from the SEMVER docs, and is what we currently use. But as we do already link to the semver docs maybe we can take the opportunity to make this a bit simpler? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this formulation isn't exactly the same as semver but it does make things clearer I think... |
||
|
||
For instance, to bump a package from v1.**0**.0 to v1.**1**.0: | ||
|
||
```sh | ||
$ pulsar -p publish minor | ||
``` | ||
|
||
Check out [semantic versioning](https://semver.org/) to learn more about best practices for versioning your package releases. | ||
|
||
You can also run `pulsar -p help publish` to see all the available options and `pulsar -p help` to see all the other available commands. Or check our the [PPM Docs]() to learn more about using `ppm`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
lang: en-US | ||
title: Pulsar Package Registry Frontend Website | ||
description: Using and Navigating the Pulsar Package Registry Website | ||
--- | ||
|
||
# Pulsar Package Registry | ||
|
||
The [Pulsar Package Registry](https://web.pulsar-edit.dev/) is an easy way for anyone on any platform to view and browse the packages that are available to install on Pulsar. | ||
|
||
|
||
::: details Sections | ||
|
||
- [Pulsar User Account](#pulsar-user-account) | ||
|
||
::: | ||
|
||
@include(sections/pulsar-user-account.md) | ||
|
||
<!-- Social Cards, Download Link, Themes --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
## Pulsar User Account | ||
|
||
A Pulsar user account enables you to publish to the Pulsar Package Registry, manage packages you've published, and “star” your favorite packages. | ||
|
||
If you don't plan on doing any of these things, you don't need to create a user account. | ||
|
||
### Creating a Pulsar User Account | ||
|
||
To create a Pulsar user account, navigate to the [Pulsar Package Registry](https://web.pulsar-edit.dev) and click "Sign In" on the top header bar — or go directly to [the signup page](https://web.pulsar-edit.dev/login). | ||
|
||
Here you can see there's a few choices of how to create your account. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- [Sign Up with a PAT Token](#sign-up-with-a-pat-token) | ||
- [Sign Up with GitHub OAuth](#sign-up-with-github-oauth) | ||
|
||
#### Sign Up with a PAT Token | ||
|
||
Using a PAT token from GitHub allows you precise control over what permissions your Pulsar User Account has over your GitHub account, which you don't get with the OAuth Signup. | ||
|
||
This way you can go to your GitHub Account and [create your own PAT token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) that is create a Personal Access Token with only the permissions you decide. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
When creating your PAT token it's good to know what scopes should be allowed access to your Pulsar User Account. By default the only scopes needed are: | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- public_repo | ||
- read:org | ||
|
||
Beyond that your Pulsar User Account won't try to use any additional permissions. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Once your PAT Token is created navigate back to the Pulsar Signup Screen and plug your PAT token into the text box where it says "Enter your GitHub PAT" and click "Sign Up". After a few redirects you should be brought to your [Pulsar User Account Page](https://web.pulsar-edit.dev/users). | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### Sign Up with GitHub OAuth | ||
|
||
Using GitHub OAuth signup means you don't have to manage the permissions and signup process on your own as opposed to the PAT Token signup. | ||
|
||
Still when signing up with GitHub OAuth the only permissions requested (That you'll be able to review during the process) are: | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- public_repo | ||
- read:org | ||
|
||
These are the only permissions needed for your Pulsar User Account to access all features it's capable of. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Once you click to "Sign Up with GitHub OAuth" you'll be redirected to GitHub to authorize Pulsar to access your account. There you can check the account you are allowing access, and review the permissions being granted. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Afterwards you should be redirected to your [Pulsar User Account Page](https://web.pulsar-edit.dev/users). | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### Managing your Account | ||
|
||
Now that your Pulsar User Account has been successfully created you can manage it on your [Pulsar User Account Page](https://web.pulsar-edit.dev/users). | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Here you can view the account information saved to Pulsar, and view your Pulsar API Token. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
This Pulsar API Token is what can be used to allow you to publish to the Pulsar Package Registry using [PPM](). | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Otherwise if you ever notice your account information here has become out of date (i.e. you've changed your profile picture) you can always click "Log Out" at the top of the page, and sign in again with the same steps as before. When you click go through the sign up process after already having created a Pulsar User Account this just updates your account information with what's most recent from GitHub. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### Notes on a Pulsar User Account | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
A few important notes about your Pulsar User Account to keep in mind. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Pulsar greatly respects your privacy, and more than that doesn't want the chance to invade your privacy, or be responsible for your sensitive account credentials. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
That's why when you create a User Account with Pulsar there are only three pieces of information stored about you: | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- Your GitHub Account Username. | ||
- Your GitHub Gravatar Image URL. | ||
- Your GitHub `node_id`. | ||
|
||
Think of your `node_id` like the random number GitHub assigned to your account when you created it. This is a public value that anyone on GitHub can find using the API and doesn't reveal any private details about yourself , your location or your account. Beyond this the Pulsar Backend collects zero information about who you are, and doesn't even save your API Keys itself. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
If you'd like to read more about how your information is used for Pulsar take a look at our [Privacy Policy]() or the [Pulsar Backend]() Documentation. | ||
confused-Techie marked this conversation as resolved.
Show resolved
Hide resolved
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A general comment about this document:
We are now encouraging people to use
pulsar -p
instead ofppm
, but we still have a need to refer to “PPM” as a concept. The concept is the suite of tools responsible for downloading, installing, developing, and publishing Pulsar packages.Hence all the references to “PPM” in the docs. I have corrected most of these to
ppm
, which I understand is troublesome because — again — we want people to start typingpulsar -p
. But if we do that, I think it's likely that a new user will fail to understand what we mean when we say “PPM.”Maybe this is a hint about how to proceed. I know that if
ppm
were ever to stop existing as a tool, I'd justalias ppm="pulsar -p"
in my.zshrc
and proceed as before. Maybe there's still value in the idea of a separate binary, even if all it does internally is callpulsar -p
.