-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from charangirijala/development
Development- Migration to LWR
- Loading branch information
Showing
29 changed files
with
21,546 additions
and
24,700 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,5 @@ | ||
# Log files | ||
logs | ||
*.log | ||
*-debug.log | ||
*-error.log | ||
|
||
# Standard lib folder | ||
/lib | ||
|
||
# Standard dist folder | ||
/dist | ||
|
||
# Tooling files | ||
node_modules | ||
|
||
# Temp directory | ||
/tmp | ||
|
||
# Jest coverage folder | ||
/coverage | ||
|
||
# MacOS system files | ||
.DS_Store | ||
|
||
# Windows system files | ||
Thumbs.db | ||
ehthumbs.db | ||
[Dd]esktop.ini | ||
$RECYCLE.BIN/ | ||
|
||
# Husky | ||
.husky | ||
site | ||
__lwr_cache__ | ||
src/assets | ||
.DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"trailingComma": "none", | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"overrides": [ | ||
{ | ||
"files": "**/*.html", | ||
"options": { "parser": "lwc" } | ||
} | ||
] | ||
"trailingComma": "none", | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"overrides": [ | ||
{ | ||
"files": "**/*.html", | ||
"options": { "parser": "lwc" } | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,70 @@ | ||
# DebugForce | ||
# LWC Boilerplate Example | ||
|
||
Here will be some information about the app. | ||
The **LWC Boilerplate** example contains the minimum code needed to get a simple Single Page Application (SPA) on LWR running. | ||
|
||
## How to start? | ||
## Project Setup | ||
|
||
Start simple by running `yarn watch` (or `npm run watch`, if you set up the project with `npm`). This will start the project with a local development server. | ||
The directory structure looks like this: | ||
|
||
The source files are located in the [`src`](./src) folder. All web components are within the [`src/modules`](./src/modules) folder. The folder hierarchy also represents the naming structure of the web components. | ||
```fs | ||
src/ | ||
├── assets/ // static assets | ||
│ └── recipes-logo.png | ||
| └── favicon.ico | ||
└── modules/ // lwc modules | ||
└── example/ | ||
└── app/ | ||
├── app.css | ||
├── app.html | ||
└── app.js | ||
lwr.config.json // lwr configuration | ||
package.json // npm packaging configuration | ||
``` | ||
|
||
Find more information on the main repo on [GitHub](https://github.com/muenzpraeger/create-lwc-app). | ||
## Configuration | ||
|
||
The LWR server is configured in `lwr.config.json`, at the root of the project. The **LWC Boilerplate** example has one LWC module and one server-side route. | ||
|
||
```json | ||
// lwr.config.json | ||
{ | ||
"lwc": { "modules": [{ "dir": "$rootDir/src/modules" }] }, | ||
"routes": [ | ||
{ | ||
"id": "example", | ||
"path": "/", | ||
"rootComponent": "example/app" | ||
} | ||
], | ||
"assets": [ | ||
{ | ||
"alias": "assetsDir", | ||
"dir": "$rootDir/src/assets", | ||
"urlPath": "/public/assets" | ||
}, | ||
{ | ||
"alias": "favicon", | ||
"file": "$rootDir/src/assets/favicon.ico", | ||
"urlPath": "/favicon.ico" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Running the Project in dev Mode | ||
|
||
```bash | ||
yarn install | ||
yarn dev # dev:compat for AMD format | ||
``` | ||
|
||
Open the site at [http://localhost:3000](http://localhost:3000) | ||
|
||
## Statically Generate and Preview the Site | ||
|
||
```bash | ||
yarn build # dev:prod-compat for AMD format | ||
yarn start | ||
``` | ||
|
||
Open the site at [http://localhost:3000](http://localhost:3000) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"lwc": { "modules": [{ "dir": "$rootDir/src/modules" }] }, | ||
"routes": [ | ||
{ | ||
"id": "example", | ||
"path": "/", | ||
"layoutTemplate":"$layoutsDir/index.html", | ||
"rootComponent": "my/app", | ||
"bootstrap": { | ||
"syntheticShadow": true | ||
} | ||
} | ||
], | ||
"assets": [ | ||
{ | ||
"alias": "assetsDir", | ||
"dir": "$rootDir/src/assets", | ||
"urlPath": "/public/assets" | ||
}, | ||
{ | ||
"alias": "favicon", | ||
"file": "$rootDir/src/assets/favicon.ico", | ||
"urlPath": "/favicon.ico" | ||
}, | ||
{ | ||
"file": "$rootDir/src/assets/icons/utility-sprite/svg/symbols.svg", | ||
"urlPath": "/lightning.utilitySprite" | ||
} | ||
] | ||
} |
Oops, something went wrong.