Skip to content

Commit

Permalink
v2.2.0
Browse files Browse the repository at this point in the history
- Fixed Livewire Hot-Reload Vite plugin
- Updated [README.md]
    - Added a TODO to install Lunar TALL package as an option
- Fixed a consistency global JS variable naming for AutoAnimate
- Set Graphite to install during setup script
- Removed NPM to rely solely on NVM
- Updated Prettier's preferences
- Updated VSC extensions list
- Updated VSC keybindings
- Updated VSC settings
  • Loading branch information
GoodM4ven committed Oct 2, 2023
1 parent 131b107 commit 09d2664
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 90 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ This way, I don't have to worry about the things I've mentioned, plus I gain the
- [php](https://www.php.net/)
- [apache2](https://httpd.apache.org/)
- [composer](https://getcomposer.org/)
- [npm](https://nodejs.org/en/download/package-manager)
- [nvm](https://github.com/nvm-sh/nvm)
- [libnss3-tools](https://packages.ubuntu.com/focal/libnss3-tools)
- [libgbm-dev](https://packages.debian.org/sid/libgbm-dev)
Expand Down Expand Up @@ -126,6 +125,7 @@ This way, I don't have to worry about the things I've mentioned, plus I gain the
- [tailwindcss](https://tailwindcss.com/) [Dev]
- [postcss](https://github.com/postcss/postcss) [Dev]
- [autoprefixer](https://github.com/postcss/autoprefixer) [Dev]
- [@formkit/auto-animate](https://github.com/formkit/auto-animate) [Dev]
- [@tailwindcss/typography](https://tailwindcss.com/docs/typography-plugin) [Dev]
- [@tailwindcss/forms](https://github.com/tailwindlabs/tailwindcss-forms) [Dev]
- [@tailwindcss/aspect-ratio](https://github.com/tailwindlabs/tailwindcss-aspect-ratio) [Dev]
Expand All @@ -141,7 +141,7 @@ This way, I don't have to worry about the things I've mentioned, plus I gain the
- [@alpinejs/morph](https://alpinejs.dev/plugins/morph)
- [@ryangjchandler/alpine-hooks](https://github.com/ryangjchandler/alpine-hooks)
- [@ralphjsmit/alpine-animate](https://github.com/ralphjsmit/alpine-animate)
- [@defstudio/vite-livewire-plugin](https://github.com/defstudio/vite-livewire-plugin) [Dev] (Disabled again until a fix!)
- [@defstudio/vite-livewire-plugin](https://github.com/defstudio/vite-livewire-plugin) [Dev]
- [alpinejs-breakpoints](https://github.com/wrsdesign/alpinejs-breakpoints) [Dev]
- [tailwind-easing](https://github.com/wrsdesign/tailwind-easing) [Dev]

Expand Down Expand Up @@ -183,6 +183,7 @@ That's it. You'll have your first project accessible in the end (displaying the

## Todos For Development:

- [ ] Add an option to install Lunar framework TALL packege
- [ ] Consider `phpredis` extension instead of `predis` for both setup and creation scripts
- [ ] Turn the main skeleton scripter into a NativePHP app
- [ ] Selective installation process as a self-deleting Composer package
Expand Down
1 change: 1 addition & 0 deletions files/.opinionated/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"printWidth": 130,
"proseWrap": "always",
"singleQuote": true,
"tabWidth": 4
Expand Down
5 changes: 3 additions & 2 deletions files/.opinionated/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- [ctf0.laravel-goto-config](https://github.com/ctf0/laravel-goto-config) [Not on VSX yet]
- [ctf0.laravel-goto-env](https://github.com/ctf0/laravel-goto-env) [Not on VSX yet]
- [ctf0.laravel-goto-lang](https://github.com/ctf0/laravel-goto-lang) [Not on VSX yet]
- [ctf0.laravel-goto-path](https://github.com/ctf0/laravel-goto-path) [Not on VSX yet]
- [ctf0.laravel-goto-view](https://github.com/ctf0/laravel-goto-view) [Not on VSX yet]
- [naoray.laravel-goto-components](https://github.com/Naoray/laravel-goto-components) [Not on VSX yet]
- [austenc.livewire-docs](https://github.com/austenc/vscode-livewire-docs) [Not on VSX yet]
Expand All @@ -47,7 +48,7 @@
- [jeff-hykin.polacode-2019](https://github.com/jeff-hykin/polacode) [Not on VSX yet]
- [csstools.postcss](https://github.com/csstools/postcss-language)
- [esbenp.prettier-vscode](https://github.com/prettier/prettier-vscode)
- [sainoba.px-to-rem](https://github.com/sainoba/vscode-px-to-rem) [Not on VSX yet]
- [sainoba.px-to-rem](https://github.com/sainoba/vscode-px-to-rem)
- [dbankier.vscode-quick-select](https://github.com/dbankier/vscode-quick-select) [Not on VSX yet]
- [jock.svg](https://github.com/lishu/vscode-svg2)
- [albert.TabOut](https://github.com/albertromkes/tabout)
Expand All @@ -56,4 +57,4 @@
- [bourhaouta.tailwindshades](https://github.com/bourhaouta/vscode-tailwindshades) [Not on VSX yet]
- [jkjustjoshing.vscode-text-pastry](https://github.com/jkjustjoshing/vscode-text-pastry) [Not on VSX yet]
- [Gruntfuggly.todo-tree](https://github.com/Gruntfuggly/todo-tree)
- [hideoo.trailing](https://github.com/HiDeoo/trailing)
- [hideoo.trailing](https://github.com/HiDeoo/trailing)
60 changes: 20 additions & 40 deletions files/.opinionated/keybindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,16 @@
"command": "-scm.acceptInput",
"when": "scmRepository"
},
{
"key": "ctrl+k m",
"command": "-workbench.action.editor.changeLanguageMode",
"when": "!notebookEditorFocused"
},
{
"key": "ctrl+shift+alt+l",
"command": "workbench.action.editor.changeLanguageMode",
"when": "!notebookEditorFocused"
},
// * ===========
// * Extensions
// * =========
Expand Down Expand Up @@ -390,6 +400,14 @@
"key": "ctrl+shift+meta+c",
"command": "foldersCompare.compareFoldersAgainstEachOther"
},
{
"key": "alt+5",
"command": "-workbench.action.openEditorAtIndex5"
},
{
"key": "alt+5",
"command": "workbench.view.extension.foldersCompare"
},
// [Polacode]
{
"key": "ctrl+alt+p",
Expand Down Expand Up @@ -596,51 +614,13 @@
"key": "ctrl+alt+g",
"command": "namespaceResolver.generateNamespace"
},
// [PHP Resolver]
{
"key": "ctrl+alt+a",
"command": "-phpResolver.importAll",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+i",
"command": "-phpResolver.import",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+n",
"command": "-phpResolver.highlightNotImported",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+e",
"command": "-phpResolver.expand",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+u",
"command": "-phpResolver.highlightNotUsed",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+s",
"command": "-phpResolver.sort",
"command": "-namespaceResolver.expand",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+g",
"command": "-phpResolver.generateNamespace"
},
{
"key": "ctrl+alt+e",
"command": "phpResolver.expand"
},
{
"key": "alt+5",
"command": "-workbench.action.openEditorAtIndex5"
"command": "namespaceResolver.expand"
},
{
"key": "alt+5",
"command": "workbench.view.extension.foldersCompare"
}
]
37 changes: 27 additions & 10 deletions files/.opinionated/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
"explorer.confirmDelete": false,
"diffEditor.ignoreTrimWhitespace": false,
"workbench.localHistory.maxFileEntries": 500,
"files.exclude": {
"**/.git": true,
"**/storage/framework/**": true
},
// "files.exclude": {
// "**/.git": true,
// "**/node_modules": true,
// "**/vendor": true,
// },
"editor.codeLens": false,
"javascript.updateImportsOnFileMove.enabled": "always",
// * Format
"editor.wordWrap": "wordWrapColumn",
Expand Down Expand Up @@ -61,7 +63,12 @@
"todo-tree.tree.showBadges": true,
"todo-tree.tree.showCountsInTree": true,
"todo-tree.general.tags": ["BUG", "HACK", "TODO", "[ ]"],
"todo-tree.filtering.excludeGlobs": ["**/node_modules", "**/vendor"],
"todo-tree.filtering.excludeGlobs": [
"**/node_modules",
"**/vendor"
],
// [Behavior - Compare Folders]
"diffEditor.maxComputationTime": 0,
// [INTEL - shell-format]
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
Expand All @@ -81,7 +88,7 @@
},
// [Format - Laravel Blade formatter]
"[blade]": {
"editor.defaultFormatter": "shufo.vscode-blade-formatter"
"editor.defaultFormatter": "shufo.vscode-blade-formatter",
},
"bladeFormatter.format.noMultipleEmptyLines": true,
"bladeFormatter.format.wrapAttributes": "force-expand-multiline",
Expand All @@ -92,7 +99,15 @@
// [Format - Prettier - Code formatter]
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.requireConfig": true,
// [INTEL - PHP Intelephense]
// ! Disable @builtin php > PHP Language Features
// ! Enter your Intelephense licence key in your application's [settings.json] (not workspace, not the user)
"intelephense.telemetry.enabled": false,
// [INTEL - Tailwind CSS IntelliSense]
"files.associations": {
"*.module": "php",
"*.css": "tailwindcss"
},
"tailwindCSS.classAttributes": [
"class",
"x-transition:enter",
Expand All @@ -102,10 +117,12 @@
"x-transition:leave-start",
"x-transition:leave-end"
],
"tailwindCSS.experimental.classRegex": [
["(?:@class|\\$attributes->class)\\(\\[?([^\\]]*)\\]?\\)", "'([^']*)'"],
["(?:@twMerge|\\$attributes->twMerge)\\(\"([^\"]*)\",?[^)]*\\)", "'([^']*)'"],
["twMerge\\(\\[?([^\\]]*)\\]?\\)", "'([^']*)'"],
["TailwindMerge::merge\\(\\[?([^\\]]*)\\]?\\)", "'([^']*)'"]
],
// // [INTEL - Alpine.js IntelliSense]
// "alpine-intellisense.settings.languageScopes": "blade", // TODO uncomment when intel shows within elements only
// [INTEL - PHP Intelephense]
// ! Disable @builtin php > PHP Language Features
// ! Enter your Intelephense licence key in your application's [settings.json] (not workspace, not the user)
"intelephense.telemetry.enabled": false
}
6 changes: 1 addition & 5 deletions files/_stubs/tall/resources/js/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import './core/livewire-hot-reload';
import './core/alpine-livewire';
// TODO reimplement after livewire v3 fix
// import './core/livewire-hot-reload';
// import './core/echo';

import './packages/alpine-animate';
Expand All @@ -14,6 +13,3 @@ import './data/colors-manager';
import './bindings/breakpointer';

Livewire.start();

// TODO reimplement after livewire v3 fix
// LivewireHotReload();
4 changes: 2 additions & 2 deletions files/_stubs/tall/resources/js/core/livewire-hot-reload.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { livewire_hot_reload } from 'virtual:livewire-hot-reload';
import {livewire_hot_reload} from 'virtual:livewire-hot-reload';

window.LivewireHotReload = livewire_hot_reload;
livewire_hot_reload();
2 changes: 1 addition & 1 deletion files/_stubs/tall/resources/js/packages/auto-animate.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import autoAnimate from '@formkit/auto-animate';

window.autoAnimate = autoAnimate;
window.AutoAnimate = autoAnimate;
30 changes: 9 additions & 21 deletions files/_stubs/tall/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import path from "path";
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
// TODO reimplement after livewire v3 fix
// import livewire from '@defstudio/vite-livewire-plugin';
import livewire from '@defstudio/vite-livewire-plugin';

const host = "<projectName>.test";
const certPath = path.resolve(__dirname, "./certs/<projectName>.test.pem");
const keyPath = path.resolve(__dirname, "./certs/<projectName>.test-key.pem");

Expand All @@ -15,7 +15,11 @@ export default defineConfig({
'resources/css/filament/admin/theme.css',
'resources/js/app.js',
],
refresh: [
refresh: false,
}),
livewire({
refresh: ['resources/css/app.css'],
watch: [
"app/Filament/**/*.php",
"app/Forms/**/*.php",
"app/Infolists/**/*.php",
Expand All @@ -24,33 +28,17 @@ export default defineConfig({
"app/Tables/**/*.php",
"app/View/Components/**/*.php",
"lang/**",
"resources/views/**/*.blade.php",
"resources/lang/**",
"routes/**",
],
}),
// livewire({
// refresh: ['resources/css/app.css'],
// watch: [
// "app/Filament/**/*.php",
// "app/Forms/**/*.php",
// "app/Infolists/**/*.php",
// "app/Livewire/**/*.php",
// "app/Providers/Filament/**/*.php",
// "app/Tables/**/*.php",
// "app/View/Components/**/*.php",
// "lang/**",
// "resources/views/**/*.blade.php",
// "resources/lang/**",
// "routes/**",
// ],
// }),
],
server: {
host,
hmr: { host },
https: {
cert: certPath,
key: keyPath,
},
host: "<projectName>.test",
},
});
4 changes: 3 additions & 1 deletion files/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import path from "path";
import { defineConfig } from 'vite';
import laravel, { refreshPaths } from 'laravel-vite-plugin';

const host = "<projectName>.test";
const certPath = path.resolve(__dirname, "./certs/<projectName>.test.pem");
const keyPath = path.resolve(__dirname, "./certs/<projectName>.test-key.pem");

Expand All @@ -18,10 +19,11 @@ export default defineConfig({
}),
],
server: {
host,
hmr: { host },
https: {
cert: certPath,
key: keyPath,
},
host: "<projectName>.test",
},
});
3 changes: 1 addition & 2 deletions scripts/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,7 @@ use App\\Http\\Controllers\\LoginRedirect;\

sed -i "s~<projectName>~$escaped_project_name~g" ./vite.config.js

# TODO Uncomment once fixed
# echo -e "\nConfigured Livewire Hot-Reload watcher." >&3
echo -e "\nConfigured Livewire Hot-Reload watcher." >&3

# Blurred Image package
php artisan blurred-image:install $conditional_quiet
Expand Down
11 changes: 7 additions & 4 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ esac
# git, php, apache2, redis and npm
echo -e "Installing system packages..." >&3

sudo apt install git curl php apache2 php-curl php-xml php-dom php-bcmath php-zip redis-server npm -y
sudo apt install git curl php apache2 php-curl php-xml php-dom php-bcmath php-zip redis-server -y

sudo sed -i "s~post_max_size = 8M~post_max_size = 100M~g" /etc/php/8.1/apache2/php.ini
sudo sed -i "s~upload_max_filesize = 2M~upload_max_filesize = 100M~g" /etc/php/8.1/apache2/php.ini
Expand Down Expand Up @@ -132,15 +132,18 @@ sudo apt install libgbm-dev libnotify-dev libgconf-2-4 xvfb -y
# NodeJS Upgrades
echo -e "\nInstalling NVM to support installing custom NodeJS and NPM versions..." >&3

# ? Check without: npm install -g npm@9.8.1
sudo -i -u $USERNAME bash <<EOF
cd /home/$USERNAME/Downloads &&
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash &&
source /home/$USERNAME/.nvm/nvm.sh &&
nvm install 14 &&
nvm use 14 &&
npm install -g npm@9.8.1
nvm install 16 &&
nvm use 16
EOF

# Graphite
npm install -g @withgraphite/graphite-cli@stable

# Composer (globally)
echo -e "\nInstalling composer globally..." >&3

Expand Down

0 comments on commit 09d2664

Please sign in to comment.