Skip to content

Commit

Permalink
docs: update web documentation
Browse files Browse the repository at this point in the history
- remove command section
- add --entry-file flag to bundle command
  • Loading branch information
leegeunhyeok committed Oct 10, 2023
1 parent 5cbf6c3 commit baac573
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 32 deletions.
54 changes: 23 additions & 31 deletions docs/docs/web/web-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,29 @@ AppRegistry.runApplication(
);
```

### Development and Build

```bash
# rne serve: Start the development server for Web
# visit http://localhost:8081 (default)
rne serve

# rne bundle: Build the bundle for the provided JavaScript entry file
rne bundle \
--platform=web \
--entry-file=index.web.js \
--bundle-output=dist/index.js

# bundle result example
dist
├── back-icon-TRKDMJBN.png
├── back-icon-mask-JPKVDL4L.png
├── esbuild-YFSWKYAM.png
├── index.html
├── index.js
└── index.js.map
```

## Page Template

### Default Template
Expand Down Expand Up @@ -137,34 +160,3 @@ exports.default = {
<div>Hello, world!</div>
<script src="index.js"></script>
```


## Commands

### Serve

Build and serve bundle.

```bash
# visit http://localhost:8081 (default)
rne serve
```

### Bundle

Build for Web.

```bash
rne bundle \
--platform=web \
--bundle-output=dist/index.js

# bundle result example
dist
├── back-icon-TRKDMJBN.png
├── back-icon-mask-JPKVDL4L.png
├── esbuild-YFSWKYAM.png
├── index.html
├── index.js
└── index.js.map
```
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"serve": "rne serve",
"bundle:android": "rne bundle --platform=android --bundle-output=dist/android.jsbundle --assets-dest=dist/assets",
"bundle:ios": "rne bundle --platform=ios --bundle-output=dist/ios.jsbundle --assets-dest=dist/assets",
"bundle:web": "rne bundle --platform=web --bundle-output=public/index.js",
"bundle:web": "rne bundle --platform=web --bundle-output=public/index.js --entry-file=index.web.js",
"start:metro": "react-native start",
"bundle:metro:android": "react-native bundle --entry-file=index.js --platform=android --bundle-output=dist/android-metro.bundlejs",
"bundle:metro:ios": "react-native bundle --entry-file=index.js --platform=ios --bundle-output=dist/ios-metro.bundlejs",
Expand Down

2 comments on commit baac573

@vercel
Copy link

@vercel vercel bot commented on baac573 Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 16.12% 358/2221
🔴 Branches 19.39% 140/722
🔴 Functions 11.11% 71/639
🔴 Lines 15.32% 314/2049

Test suite run success

98 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from baac573

Please sign in to comment.