Skip to content

Commit

Permalink
LWR migration (#52)
Browse files Browse the repository at this point in the history
* feat: switched to LWR

* build: release 3.0.0

* doc: added SF_API_VERSION var to .env template
  • Loading branch information
pozil authored Jun 13, 2022
1 parent 2246fb3 commit 9624434
Show file tree
Hide file tree
Showing 20 changed files with 5,061 additions and 13,687 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ logs
node_modules
jsconfig.json
.vscode
__lwr_cache__

# Temp directory
/tmp
Expand Down
5 changes: 3 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ coverage/

# Default build folder
dist/
__lwr_cache__

# Default resources folder
src/client/resources
# Default assets folder
src/client/assets
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Create a `.env` file at the root of the project:

```
SF_LOGIN_URL='https://test.salesforce.com'
SF_API_VERSION='55.0'
SF_USERNAME='YOUR_SALESFORCE_USERNAME'
SF_PASSWORD='YOUR_SALESFORCE_PASSWORD'
SF_TOKEN='YOUR_SALESFORCE_SECURITY_TOKEN'
Expand Down
7 changes: 6 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
"name": "Quiz Player App",
"description": "Multiplayer quiz app built on Salesforce technology (player app)",
"repository": "https://github.com/pozil/quiz-player-app",
"logo": "https://github.com/pozil/quiz-player-app/raw/master/src/client/resources/logo.png",
"logo": "https://github.com/pozil/quiz-player-app/raw/master/src/client/assets/logo.png",
"keywords": ["lightning", "salesforce", "web-components", "open source"],
"env": {
"SF_LOGIN_URL": {
"description": "Salesforce authentication domain",
"value": "https://test.salesforce.com/",
"required": true
},
"SF_API_VERSION": {
"description": "Salesforce API version",
"value": "55.0",
"required": true
},
"SF_USERNAME": {
"description": "Salesforce username",
"value": "",
Expand Down
9 changes: 0 additions & 9 deletions jest.config.js

This file was deleted.

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

This file was deleted.

1 change: 0 additions & 1 deletion lwc.config.json

This file was deleted.

22 changes: 22 additions & 0 deletions lwr.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"layoutsDir": "$rootDir/src/client/layouts",
"lwc": {
"modules": [{ "dir": "$rootDir/src/client/modules" }]
},
"bundleConfig": { "exclude": ["lwc"] },
"assets": [
{
"alias": "assetsDir",
"dir": "$rootDir/src/client/assets",
"urlPath": "/assets"
}
],
"routes": [
{
"id": "home",
"path": "/",
"rootComponent": "ui/app",
"layoutTemplate": "$layoutsDir/index.html"
}
]
}
18,249 changes: 4,623 additions & 13,626 deletions package-lock.json

Large diffs are not rendered by default.

31 changes: 17 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
{
"name": "quiz-player-app",
"description": "Multiplayer quiz app built on Salesforce technology (player app)",
"version": "2.1.2",
"version": "3.0.0",
"private": true,
"author": "pozil",
"bugs": "https://github.com/fostive/quiz-player-app/issues",
"dependencies": {
"@babel/core": "^7.18.2",
"dotenv": "^16.0.1",
"express": "^4.18.1",
"jsforce": "^1.11.0",
"lwc": "^2.14.1",
"lwr": "^0.6.5",
"normalize.css": "^8.0.1",
"ws": "^8.6.0"
},
"devDependencies": {
"eslint": "^7.32.0",
"@lwc/eslint-plugin-lwc": "^1.2.1",
"@lwc/jest-preset": "^11.4.0",
"@salesforce/eslint-config-lwc": "^3.3.0",
"@salesforce/eslint-plugin-lightning": "^1.0.0",
"eslint": "^8.17.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.5.3",
"husky": "^8.0.1",
"lint-staged": "^12.4.1",
"lwc-services": "^3.2.2",
"jest": "^28.1.1",
"lint-staged": "^13.0.1",
"prettier": "^2.6.2"
},
"engines": {
Expand All @@ -37,18 +45,13 @@
},
"repository": "pozil/quiz",
"scripts": {
"start": "node src/server/server.js",
"build": "lwc-services build -m production",
"build:development": "lwc-services build",
"start": "MODE=prod node src/server/server.js",
"dev": "node src/server/server.js",
"lint": "eslint ./src/**/*.js",
"prettier": "prettier --write '**/*.{css,html,js,json,md,yaml,yml}'",
"prettier:verify": "prettier --list-different '**/*.{css,html,js,json,md,yaml,yml}'",
"test:unit": "lwc-services test:unit",
"test:unit:coverage": "lwc-services test:unit --coverage",
"test:unit:debug": "lwc-services test:unit --debug",
"test:unit:watch": "lwc-services test:unit --watch",
"preinstall": "rm -fr src/client/resources/dist",
"postinstall": "husky install && mkdir -p src/client/resources/dist && cp node_modules/normalize.css/normalize.css src/client/resources/dist/.",
"preinstall": "rm -fr src/client/assets/dist",
"postinstall": "husky install && mkdir -p src/client/assets/dist && cp node_modules/normalize.css/normalize.css src/client/assets/dist/.",
"precommit": "lint-staged"
},
"volta": {
Expand Down
Loading

0 comments on commit 9624434

Please sign in to comment.