Skip to content

Commit

Permalink
Merge pull request #2 from charangirijala/development
Browse files Browse the repository at this point in the history
Development- Migration to LWR
  • Loading branch information
charangirijala authored Dec 21, 2024
2 parents 187a0cb + 3f952db commit 4605fa0
Show file tree
Hide file tree
Showing 29 changed files with 21,546 additions and 24,700 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

10 changes: 0 additions & 10 deletions .eslintrc.json

This file was deleted.

35 changes: 4 additions & 31 deletions .gitignore
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
11 changes: 0 additions & 11 deletions .prettierignore

This file was deleted.

18 changes: 9 additions & 9 deletions .prettierrc
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" }
}
]
}
71 changes: 65 additions & 6 deletions README.md
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)
9 changes: 0 additions & 9 deletions jest.config.js

This file was deleted.

11 changes: 0 additions & 11 deletions lwc-services.config.js

This file was deleted.

7 changes: 0 additions & 7 deletions lwc.config.json

This file was deleted.

30 changes: 30 additions & 0 deletions lwr.config.json
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"
}
]
}
Loading

0 comments on commit 4605fa0

Please sign in to comment.