Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

Commit 128b335

Browse files
committed
Add installation and usage details
1 parent 37681c4 commit 128b335

File tree

1 file changed

+62
-6
lines changed

1 file changed

+62
-6
lines changed

README.md

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# Remark SnackPlayer
1+
<h1 align="center"> Remark SnackPlayer </h1>
22

3+
Remark plugin to embed [Expo Snack's](https://snack.expo.io/) using Code Blocks
4+
5+
<hr>
36

47
<p align="center">
58

@@ -15,8 +18,61 @@
1518

1619
</p>
1720

18-
<p align="center">
19-
<a href="#key-features">Key Features</a> •
20-
<a href="#howto">How To Use</a> •
21-
<a href="#credits">Credits</a>
22-
</p>
21+
## Installing
22+
23+
`npm install remark-snackplayer`
24+
25+
or
26+
27+
`yarn add remark-snackplayer`
28+
29+
## Usage
30+
31+
This plugin parses codeblocks with language set as `SnackPlayer` and replaces them with embedded Expo's SnackPlayers, you can also provide parameters along with the codeblock to set some basic details.
32+
33+
Example Code Block:
34+
35+
````
36+
37+
```SnackPlayer name=Hello%20World description=This%20is%20a%20description
38+
import React from 'react';
39+
import { Text, View } from 'react-native';
40+
41+
const YourApp = () => {
42+
return (
43+
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
44+
<Text>
45+
Try editing me! 🎉
46+
</Text>
47+
</View>
48+
);
49+
}
50+
51+
export default YourApp;```
52+
53+
54+
````
55+
56+
The above code snippet would look like this on your page
57+
58+
<img width="783" alt="Screenshot 2020-10-03 at 1 11 19 AM" src="https://user-images.githubusercontent.com/11258286/94963203-67de3500-0515-11eb-974a-a2289c0bfdc8.png">
59+
60+
61+
Parameters:
62+
63+
| Name | Description | Default |
64+
| ------------------ | -------------------------- | ----------------- |
65+
| name | SnackPlayer Name | "Example" |
66+
| description | Description of the example | "Example usage" |
67+
| platform | Example Platform | "ios" |
68+
| supportedPlatforms | Supported Platforms | "ios,android,web" |
69+
70+
## To Do
71+
72+
* Support Passing Configuration Parameters
73+
* Fix and Document Mobile Fallback
74+
* Write Comprehensive tests
75+
76+
## License
77+
78+
[MIT](./LICENSE) © Darsh Patel

0 commit comments

Comments
 (0)