Skip to content
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

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
26bcc95
Basic skeleton of Launch Manual v2
confused-Techie Jan 30, 2023
7f95b6c
Publishing Package Docs
confused-Techie Jan 30, 2023
077ff90
Added Pulsar Package Registry Frontend Website Docs
confused-Techie Jan 30, 2023
93ba224
Update docs/docs/launch-manual-v2/index.md
confused-Techie Feb 22, 2023
72b8c30
Update docs/docs/launch-manual-v2/index.md
confused-Techie Feb 22, 2023
936d70d
Update docs/docs/launch-manual-v2/index.md
confused-Techie Feb 22, 2023
2aba647
Update docs/docs/launch-manual-v2/sections/authoring-packages/index.md
confused-Techie Feb 22, 2023
310da84
Update docs/docs/launch-manual-v2/index.md
confused-Techie Feb 22, 2023
dc789fc
Update docs/docs/launch-manual-v2/sections/authoring-packages/index.md
confused-Techie Feb 22, 2023
308028d
Update docs/docs/launch-manual-v2/sections/authoring-packages/index.md
confused-Techie Feb 22, 2023
dece773
Update docs/docs/launch-manual-v2/sections/authoring-packages/index.md
confused-Techie Feb 22, 2023
6a59cba
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
b87a9d0
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
d4699f9
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
b8bb671
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
0d212bc
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
fbc0c69
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
b8fcb8e
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
0e9af20
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
947fae6
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
58ce937
Update docs/docs/launch-manual-v2/sections/ppr-frontend/index.md
confused-Techie Feb 22, 2023
35ad982
Update docs/docs/launch-manual-v2/sections/ppr-frontend/index.md
confused-Techie Feb 22, 2023
fd7758f
Update docs/docs/launch-manual-v2/sections/ppr-frontend/index.md
confused-Techie Feb 22, 2023
a5b7b64
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
edce353
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
ba84d97
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
f51d4bd
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
913b4ac
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
0f4803b
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
8ed0b64
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
d7eb53e
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
c304afa
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
4763393
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
1a733ed
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
1f1eb16
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
ece7baf
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
1556307
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
96a558e
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
2fd2e26
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
34ec523
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
18730d4
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
4d67fcb
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
ee57d91
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
62d4bb7
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
e4889b1
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
24b85cd
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
2f3ff48
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
f258bd5
Update docs/docs/launch-manual-v2/sections/ppr-frontend/sections/puls…
confused-Techie Feb 22, 2023
8026838
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
4ea85ab
Update docs/docs/launch-manual-v2/sections/authoring-packages/section…
confused-Techie Feb 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/docs/launch-manual-v2/index.md
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.
29 changes: 29 additions & 0 deletions docs/docs/launch-manual-v2/sections/authoring-packages/index.md
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
Copy link
Contributor

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 of ppm, 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 typing pulsar -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 just alias 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 call pulsar -p.


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 the `name`, `description`, and `repository` fields.
- 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.
Copy link
Contributor

Choose a reason for hiding this comment

The 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. This API key, like your GitHub credentials, is stored securely in your [keychain](<https://en.wikipedia.org/wiki/Keychain_(software)>).

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.
Copy link
Contributor

Choose a reason for hiding this comment

The 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
minor - downgrading breaks
patch - neither

Copy link
Member Author

Choose a reason for hiding this comment

The 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?

Copy link
Contributor

@icecream17 icecream17 Feb 22, 2023

Choose a reason for hiding this comment

The 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`.
20 changes: 20 additions & 0 deletions docs/docs/launch-manual-v2/sections/ppr-frontend/index.md
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,69 @@
## 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).

There are two ways to create an account:

- [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.

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), granting only the permissions that Pulsar needs.

Pulsar needs **only** the permissions listed below:

- public_repo
- read:org


Once your PAT Token is created, navigate back to the Pulsar signup page. Paste your PAT token into the "Enter your GitHub PAT" text box and click "Sign Up." After a few redirects, you should be brought to your [Pulsar user account page](https://web.pulsar-edit.dev/users).

#### 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.

When you click "Sign Up with GitHub OAuth," you'll be redirected to GitHub to authorize Pulsar to access your account. On that page, you can double-check that you're connecting Pulsar to the correct account and review the permissions being granted.

You'll be able to confirm that the **only** permissions requested by Pulsar are the following:

- public_repo
- read:org



Afterwards you should be redirected to your [Pulsar user account page](https://web.pulsar-edit.dev/users).

#### 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).

On this page, you can view the account information saved to Pulsar and your Pulsar API token. This token is what enables you to publish to the Pulsar Package Registry using `ppm`.


If you need to refresh your account information — for instance, if you've changed your profile picture — you can click "Log Out" at the top of the page and sign in again using the same process described above. This does not affect any of the packages you've already published.

#### Privacy


Pulsar respects your privacy. We don't want to feel intrusive, and we especially don't want the responsibility of managing your sensitive information.

That's why we store only three pieces of information about you when you create a Pulsar user account:

- Your GitHub Account Username.
- Your GitHub Gravatar Image URL.
- Your GitHub `node_id`.

Think of your `node_id` as a 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. It doesn't reveal any private details about yourself, your location, or your account.

Beyond these three values, Pulsar collects and stores nothing about who you are. Pulsar doesn't even store your API key.

If you want to know more about how your information is used, please read our [privacy policy]() or the [Pulsar backend]() documentation.
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.