create-towns-protocol-app 0.0.189

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 River Association
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # Create Towns Protocol App
2
+
3
+ This package is used to scaffold a new React Towns Protocol app.
4
+
5
+ ## Templates
6
+
7
+ ### Playground Template
8
+
9
+ By default, the script will create a new app using the Playground template: a full-featured example application.
10
+
11
+ ```bash
12
+ yarn create towns-protocol-app my-app
13
+ ```
14
+
15
+ ### React Templates
16
+
17
+ It will run `create-vite` to scaffold the project using either `react-ts` or `react` template.
18
+
19
+ Then, it will install the necessary dependencies: `@towns-protocol/sdk` and `@towns-protocol/react-sdk`.
20
+
21
+ Finally, it will add the `vite-plugin-node-polyfills` to the `vite.config.ts` file to ensure compatibility with Node.js native modules that are used by the Towns Protocol SDK.
22
+
23
+ ```bash
24
+ yarn create towns-protocol-app my-app --template react-ts
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ You can use your preferred package manager to run the command.
30
+ Example using `yarn`:
31
+
32
+ ```bash
33
+ yarn create towns-protocol-app
34
+ ```
35
+
36
+ This will create a new React Towns Protocol app in the current directory.
37
+
38
+ If you want to create a new app in a different directory, you can specify the directory name as an argument:
39
+
40
+ ```bash
41
+ yarn create towns-protocol-app my-app
42
+ ```
43
+
44
+ You can specify a template using the `-t` or `--template` flag:
45
+
46
+ ```bash
47
+ yarn create towns-protocol-app my-app --template react-ts
48
+ ```
49
+
50
+ Available templates:
51
+
52
+ - playground (default)
53
+ - react-ts
54
+ - react