Skip to content

Commit

Permalink
Convert installer to a Vite-based build system
Browse files Browse the repository at this point in the history
  • Loading branch information
bennothommo committed Mar 10, 2022
1 parent ac2a895 commit 9bc4f49
Show file tree
Hide file tree
Showing 19 changed files with 5,179 additions and 29,377 deletions.
2 changes: 1 addition & 1 deletion .env.local.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Web base URL to the /install/api.php script.
VUE_APP_INSTALL_URL="http://127.0.0.1:8081"
VITE_APP_INSTALL_URL="http://127.0.0.1:8081"
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Web base URL to the /install/api.php script. On production, this should remain as is.
VUE_APP_INSTALL_URL="./install"
VITE_APP_INSTALL_URL="./install"
30 changes: 17 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
.DS_Store
node_modules
/dist
/public/.temp.sqlite
/public/install.log
/public/.ignore-ssl

# local env files
.env.local
.env.*.local

# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vscode
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Installer files
public/.temp.sqlite
public/install.log
public/.ignore-ssl
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["johnsoncodehk.volar"]
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ composer --working-dir=./public/install/api install
The included dependencies include a simple web-server which performs hot-reloading of the app when changes are made. To start this server, run the following:

```
npm run serve
npm run dev
```

You will be given a URL in which you can review the application in your browser.

When developing in this format, you will need to provide a URL in order to access the PHP API file located in `public/install/api.php`. You will need to create a file called `.env.local` inside the root folder of your development copy, and add the following line:

```
VUE_APP_INSTALL_URL="<path>"
VITE_APP_INSTALL_URL="<path>"
```

Substituting `<path>` with the URL to the `public/install` directory as it would be located on your web server. You can run the in-built PHP server to serve this, by navigating to this folder and running the following command:
Expand All @@ -73,7 +73,7 @@ php -S 127.0.0.1:8081
In following the above, the `.env.local` file should contain the following:

```
VUE_APP_INSTALL_URL="http://127.0.0.1:8081"
VITE_APP_INSTALL_URL="http://127.0.0.1:8081"
```

### Building the application
Expand Down
5 changes: 0 additions & 5 deletions babel.config.js

This file was deleted.

15 changes: 15 additions & 0 deletions install.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/install/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>Winter CMS Installer</title>
<link href="https://fonts.googleapis.com/css2?family=Assistant:wght@500;800&amp;family=Heebo:wght@300;400;600;700&amp;display=swap" rel="stylesheet">
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
Loading

0 comments on commit 9bc4f49

Please sign in to comment.