From 1f6169fb3f774d9ae2990919e4053a558716e783 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 14 Apr 2023 15:17:44 -0400 Subject: [PATCH] Add README to webapp folder (#22831) * Add README to webapp folder * Remove old web app README * Rewrite a sentence to remove jargon --- webapp/README.md | 28 ++++++++++++++++++++ webapp/channels/README.md | 56 --------------------------------------- webapp/platform/README.md | 17 ------------ 3 files changed, 28 insertions(+), 73 deletions(-) create mode 100644 webapp/README.md delete mode 100644 webapp/channels/README.md diff --git a/webapp/README.md b/webapp/README.md new file mode 100644 index 0000000000..dfb7d47a09 --- /dev/null +++ b/webapp/README.md @@ -0,0 +1,28 @@ +# Mattermost Web App + +This folder contains the client code for the Mattermost web app. It's broken up into multiple packages each of which either contains an area of the app (such as `playbooks` or `boards`) or shared logic used across other packages (such as the packages located in the `platform` directory). For anyone who's used to working in [the mattermost/mattermost-webapp repo](https://github.com/mattermost/mattermost-webapp), most of that is now located in `channels`. + +## npm Workspaces + +To interact with a workspace using npm, such as to add a dependency or run a script, use the `--workspace` (or `--workspaces`) flag. This can be done when using built-in npm commands such as `npm add` or when running scripts. Those commands should be run from this directory. + +```sh +# Add a dependency to a single package +npm add react --workspace=boards + +# Build multiple packages +npm run build --workspace=packages/client --workspace=packages/components + +# Test all workspaces +npm test --workspaces + +# Clean all workspaces that have a clean script defined +npm run clean --workspaces --if-present +``` + +To install dependencies for a workspace, simply run `npm install` from this folder as you would do normally. Most packages' dependencies will be included in the root `node_modules`, and all packages' dependencies will appear in the `package-lock.json`. A `node_modules` will only be created inside a package if one of its dependencies conflicts with that of another package. + +## Useful Links + +- [Developer setup](https://developers.mattermost.com/contribute/developer-setup/), now included with the Mattermost server developer setup +- [Web app developer documentation](https://developers.mattermost.com/contribute/more-info/webapp/) \ No newline at end of file diff --git a/webapp/channels/README.md b/webapp/channels/README.md deleted file mode 100644 index 48fcadb720..0000000000 --- a/webapp/channels/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# Mattermost Web App -# [![Mattermost](https://user-images.githubusercontent.com/7205829/137170381-fe86eef0-bccc-4fdd-8e92-b258884ebdd7.png)](https://mattermost.com) - -[Mattermost](https://mattermost.com) is an open source platform for secure collaboration across the entire software development lifecycle. This repo is the primary source for core development on the Mattermost platform; it's written in Golang and React, and runs as a single Linux binary with MySQL or PostgreSQL. A new compiled version is released under an MIT license every month on the 16th. - -mattermost-hero - -This repo hosts the webapp client code. If you'd like to report an issue with Mattermost, please create an issue on [mattermost-server](https://github.com/mattermost/mattermost-server), which hosts the server code. You can also look at the [Get Help With Mattermost](https://docs.mattermost.com/guides/get-help.html) guide to find the resources available to our community. - -- [Product documentation](https://docs.mattermost.com/) -- [Developer documentation](https://developers.mattermost.com/) -- [Download compiled version](https://mattermost.com/download) - -## Try out Mattermost - -- [Join the Mattermost Contributor's server](https://community.mattermost.com/signup_user_complete/?id=codoy5s743rq5mk18i7u5ksz7e) to join community discussions about contributions, development and more -- [Get started with Mattermost Cloud](https://customers.mattermost.com/cloud/signup) to try out Mattermost - -[![Deploy a Preview](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/mattermost/mattermost-heroku) - -_Note: Heroku preview does not include email or persistent storage._ - -## Install Mattermost - -- [Deploy Guide](https://docs.mattermost.com/guides/deployment.html) - Deploy Mattermost in minutes via Docker, Ubuntu, or tar. -- [Developer Machine Setup](https://developers.mattermost.com/contribute/server/developer-setup) - Follow this guide if you want to write code for Mattermost - -Other Install Guides: -- [Deploy Mattermost on Docker](https://docs.mattermost.com/install/install-docker.html) -- [Mattermost Omnibus](https://docs.mattermost.com/install/installing-mattermost-omnibus.html) -- [Install Mattermost from Tar](https://docs.mattermost.com/install/install-tar.html) -- [Ubuntu 20.04 LTS](https://docs.mattermost.com/install/installing-ubuntu-2004-LTS.html) -- [Kubernetes](https://docs.mattermost.com/install/install-kubernetes.html) -- [Helm](https://docs.mattermost.com/install/install-kubernetes.html#installing-the-operators-via-helm) -- [Debian Buster](https://docs.mattermost.com/install/install-debian.html) -- [RHEL 8](https://docs.mattermost.com/install/install-rhel-8.html) -- [More server install guides](https://docs.mattermost.com/guides/deployment.html) - -## Get Involved - -- [Contribute to Mattermost](https://handbook.mattermost.com/contributors/contributors/ways-to-contribute) -- [Find "Help Wanted" projects](https://github.com/mattermost/mattermost-server/issues?page=1&q=is%3Aissue+is%3Aopen+%22Help+Wanted%22&utf8=%E2%9C%93) -- [Join Developer Discussion on a Mattermost Server for contributors](https://docs.mattermost.com/guides/community-chat.html) -- [Get Help With Mattermost](https://docs.mattermost.com/guides/get-help.html) - -## Learn More - -- [API Options - webhooks, slash commands, drivers and web service](https://api.mattermost.com/) -- [Localization Guide](https://handbook.mattermost.com/contributors/contributors/localization) - -## Get the Latest News - -- **Twitter** - Follow [Mattermost](https://twitter.com/Mattermost) -- **Email** - Subscribe to our [newsletter](https://mattermost.com/community-newsletter/) - -Any other questions, mail us at [info@mattermost.com](mailto:info@mattermost.com). We'd love to meet you! diff --git a/webapp/platform/README.md b/webapp/platform/README.md index 1340c2e844..faa21e41fa 100644 --- a/webapp/platform/README.md +++ b/webapp/platform/README.md @@ -1,22 +1,5 @@ This folder contains a number of packages intended to be built and shipped separately on NPM as well as a few legacy packages for internal use only (`reselect` and `mattermost-redux`). The following documentation only applies to the newer packages and not to the legacy ones. -### Working with subpackages - -To interact with one or more packages in a workspace, such as to add a dependency or run a script, use the `--workspace` (or `--workspaces`) flag. This can be done when using built-in NPM commands such as `npm add` or when running scripts. This doesn't need to be done from inside the package. - -```sh -# Add a dependency to a single package -npm add react --workspace=packages/apple - -# Build multiple packages -npm run build --workspace=packages/banana --workspace=packages/carrot - -# Clean all workspaces -npm run clean --workspaces -``` - -To install dependencies for a workspace, simply run `npm install` from the root of the source tree as you would do normally. Every packages' dependencies will be included in `node_modules` and in the `package-lock.json` which are shared across the repo. - ### Importing a subpackage Subpackages should be imported using their full name, both inside the web app and when installing them using `npm`. They should not be imported using a relative path, and the `src` folder shouldn't be necessary to include.