add CONTRIBUTING.md
This commit is contained in:
parent
ec80a3847b
commit
8725225b68
84
CONTRIBUTING.md
Normal file
84
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,84 @@
|
|||
# Contributing to Pinafore
|
||||
|
||||
## Caveats
|
||||
|
||||
Please note that this project is _very_ beta right now, and I'm
|
||||
not in a good position to accept large PRs for
|
||||
big new features.
|
||||
|
||||
I'm making my code open-source for the sake of
|
||||
transparency and because it's the right thing to do, but I'm hesitant
|
||||
to start nurturing a community because of
|
||||
[all that entails](https://nolanlawson.com/2017/03/05/what-it-feels-like-to-be-an-open-source-maintainer/).
|
||||
|
||||
So I may not be very responsive to PRs or issues. Thanks for understanding.
|
||||
|
||||
## Building
|
||||
|
||||
To build Pinafore for production:
|
||||
|
||||
npm install
|
||||
npm run build
|
||||
PORT=4002 npm start
|
||||
|
||||
Now Pinafore is running at `localhost:4002`.
|
||||
|
||||
## Development
|
||||
|
||||
To run a dev server with hot reloading:
|
||||
|
||||
npm run dev
|
||||
|
||||
Now it's running at `localhost:4002`.
|
||||
|
||||
## Linting
|
||||
|
||||
Pinafore uses [JavaScript Standard Style](https://standardjs.com/).
|
||||
|
||||
Lint:
|
||||
|
||||
npm run lint
|
||||
|
||||
Automatically fix most linting issues:
|
||||
|
||||
npx standard --fix
|
||||
|
||||
## Testing
|
||||
|
||||
_**Note:** If you have a local `mastodon_development` Postgres database, this will erase it._
|
||||
|
||||
Run integration tests, using headless Chrome by default:
|
||||
|
||||
npm test
|
||||
|
||||
Run tests for a particular browser:
|
||||
|
||||
BROWSER=chrome npm run test-browser
|
||||
BROWSER=chrome:headless npm run test-browser
|
||||
BROWSER=firefox npm run test-browser
|
||||
BROWSER=firefox:headless npm run test-browser
|
||||
BROWSER=safari npm run test-browser
|
||||
BROWSER=edge npm run test-browser
|
||||
|
||||
## Testing in development mode
|
||||
|
||||
_**Note:** If you have a local `mastodon_development` Postgres database, this will erase it._
|
||||
|
||||
In separate terminals:
|
||||
|
||||
1\. Run a Mastodon dev server:
|
||||
|
||||
npm run run-mastodon
|
||||
|
||||
2\. Run a Pinafore dev server:
|
||||
|
||||
npm run dev
|
||||
|
||||
3\. Run a debuggable TestCafé instance:
|
||||
|
||||
npx testcafe --hostname localhost --skip-js-errors --debug-mode firefox tests/spec
|
||||
|
||||
If you want to export the current data in the Mastodon instance as canned data,
|
||||
so that it can be loaded later, run:
|
||||
|
||||
npm run backup-mastodon-data
|
59
README.md
59
README.md
|
@ -23,6 +23,7 @@ This section lays out some high-level goals for Pinafore, as well as the goals i
|
|||
- Support Pleroma/non-Mastodon backends
|
||||
- i18n
|
||||
- Offline search
|
||||
- Full emoji keyboard
|
||||
|
||||
### Non-goals
|
||||
|
||||
|
@ -30,65 +31,11 @@ This section lays out some high-level goals for Pinafore, as well as the goals i
|
|||
- React Native / NativeScript / hybrid-native version
|
||||
- Full functionality with JavaScript disabled
|
||||
- Emoji support beyond the built-in system emoji
|
||||
- Custom emoji keyboard
|
||||
- Multi-column support
|
||||
- Keyboard shortcuts
|
||||
- Admin/moderation panel
|
||||
- Works offline in read-write mode
|
||||
|
||||
## Building
|
||||
## Building and contributing
|
||||
|
||||
npm install
|
||||
npm run build
|
||||
PORT=4002 npm start
|
||||
|
||||
Now it's running at `localhost:4002`.
|
||||
|
||||
## Development
|
||||
|
||||
npm run dev
|
||||
|
||||
Now it's running at `localhost:4002`.
|
||||
|
||||
## Testing in development mode
|
||||
|
||||
In separate terminals:
|
||||
|
||||
1\. Run a Mastodon dev server (note this destroys the `mastodon_development` database and inserts canned data):
|
||||
|
||||
npm run run-mastodon
|
||||
|
||||
2\. Run a Pinafore dev server:
|
||||
|
||||
npm run dev
|
||||
|
||||
3\. Run a debuggable TestCafé instance:
|
||||
|
||||
npx testcafe --hostname localhost --skip-js-errors --debug-mode firefox tests/spec
|
||||
|
||||
If you want to export the current data in the Mastodon instance as canned data, so that it can be loaded later:
|
||||
|
||||
npm run backup-mastodon-data
|
||||
|
||||
## Testing
|
||||
|
||||
Lint:
|
||||
|
||||
npm run lint
|
||||
|
||||
Run integration tests:
|
||||
|
||||
npm test
|
||||
|
||||
Run tests for a particular browser:
|
||||
|
||||
BROWSER=chrome npm run test-browser
|
||||
BROWSER=chrome:headless npm run test-browser
|
||||
BROWSER=firefox npm run test-browser
|
||||
BROWSER=firefox:headless npm run test-browser
|
||||
BROWSER=safari npm run test-browser
|
||||
BROWSER=edge npm run test-browser
|
||||
|
||||
Automatically fix most linting issues:
|
||||
|
||||
npx standard --fix
|
||||
See [CONTRIBUTING.md](https://github.com/nolanlawson/pinafore/blob/master/CONTRIBUTING.md).
|
Loading…
Reference in a new issue