Skip to content

Commit

Permalink
Update to Inertia 1.0 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher authored Apr 2, 2024
1 parent 46491b5 commit 36e721f
Show file tree
Hide file tree
Showing 20 changed files with 111 additions and 64 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ jobs:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Install node dependencies
run: npm ci

- name: Generate application key
run: php artisan key:generate

- name: Build assets
run: npm run build

- name: Run tests
run: php artisan test
env:
Expand Down
125 changes: 86 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
"build": "vite build && vite build --ssr"
},
"devDependencies": {
"@inertiajs/inertia": "^0.11.0",
"@inertiajs/inertia-vue3": "^0.6.0",
"@inertiajs/progress": "^0.2.7",
"@inertiajs/server": "^0.1.0",
"@inertiajs/vue3": "^1.0.15",
"@popperjs/core": "^2.11.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/server-renderer": "^3.2.27",
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</template>

<script>
import { Head } from '@inertiajs/inertia-vue3'
import { Head } from '@inertiajs/vue3'
import Logo from '@/Shared/Logo.vue'
import TextInput from '@/Shared/TextInput.vue'
import LoadingButton from '@/Shared/LoadingButton.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Contacts/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</template>

<script>
import { Head, Link } from '@inertiajs/inertia-vue3'
import { Head, Link } from '@inertiajs/vue3'
import Layout from '@/Shared/Layout.vue'
import TextInput from '@/Shared/TextInput.vue'
import SelectInput from '@/Shared/SelectInput.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Contacts/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</template>

<script>
import { Head, Link } from '@inertiajs/inertia-vue3'
import { Head, Link } from '@inertiajs/vue3'
import Layout from '@/Shared/Layout.vue'
import TextInput from '@/Shared/TextInput.vue'
import SelectInput from '@/Shared/SelectInput.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Contacts/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</template>

<script>
import { Head, Link } from '@inertiajs/inertia-vue3'
import { Head, Link } from '@inertiajs/vue3'
import Icon from '@/Shared/Icon.vue'
import pickBy from 'lodash/pickBy'
import Layout from '@/Shared/Layout.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Dashboard/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</template>

<script>
import { Head } from '@inertiajs/inertia-vue3'
import { Head } from '@inertiajs/vue3'
import Layout from '@/Shared/Layout.vue'
export default {
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Organizations/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</template>

<script>
import { Head, Link } from '@inertiajs/inertia-vue3'
import { Head, Link } from '@inertiajs/vue3'
import Layout from '@/Shared/Layout.vue'
import TextInput from '@/Shared/TextInput.vue'
import SelectInput from '@/Shared/SelectInput.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Organizations/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</template>

<script>
import { Head, Link } from '@inertiajs/inertia-vue3'
import { Head, Link } from '@inertiajs/vue3'
import Icon from '@/Shared/Icon.vue'
import Layout from '@/Shared/Layout.vue'
import TextInput from '@/Shared/TextInput.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Organizations/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</template>

<script>
import { Head, Link } from '@inertiajs/inertia-vue3'
import { Head, Link } from '@inertiajs/vue3'
import Icon from '@/Shared/Icon.vue'
import pickBy from 'lodash/pickBy'
import Layout from '@/Shared/Layout.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Reports/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</template>

<script>
import { Head } from '@inertiajs/inertia-vue3'
import { Head } from '@inertiajs/vue3'
import Layout from '@/Shared/Layout.vue'
export default {
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Users/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</template>

<script>
import { Head, Link } from '@inertiajs/inertia-vue3'
import { Head, Link } from '@inertiajs/vue3'
import Layout from '@/Shared/Layout.vue'
import FileInput from '@/Shared/FileInput.vue'
import TextInput from '@/Shared/TextInput.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Users/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</template>

<script>
import { Head, Link } from '@inertiajs/inertia-vue3'
import { Head, Link } from '@inertiajs/vue3'
import Layout from '@/Shared/Layout.vue'
import TextInput from '@/Shared/TextInput.vue'
import FileInput from '@/Shared/FileInput.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Users/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</template>

<script>
import { Head, Link } from '@inertiajs/inertia-vue3'
import { Head, Link } from '@inertiajs/vue3'
import Icon from '@/Shared/Icon.vue'
import pickBy from 'lodash/pickBy'
import Layout from '@/Shared/Layout.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Shared/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</template>

<script>
import { Link } from '@inertiajs/inertia-vue3'
import { Link } from '@inertiajs/vue3'
import Icon from '@/Shared/Icon.vue'
import Logo from '@/Shared/Logo.vue'
import Dropdown from '@/Shared/Dropdown.vue'
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Shared/MainMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</template>

<script>
import { Link } from '@inertiajs/inertia-vue3'
import { Link } from '@inertiajs/vue3'
import Icon from '@/Shared/Icon.vue'
export default {
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Shared/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</template>

<script>
import { Link } from '@inertiajs/inertia-vue3'
import { Link } from '@inertiajs/vue3'
export default {
components: {
Expand Down
5 changes: 1 addition & 4 deletions resources/js/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import '../css/app.css'
import { createApp, h } from 'vue'
import { InertiaProgress } from '@inertiajs/progress'
import { createInertiaApp } from '@inertiajs/inertia-vue3'

InertiaProgress.init()
import { createInertiaApp } from '@inertiajs/vue3'

createInertiaApp({
resolve: name => {
Expand Down
4 changes: 2 additions & 2 deletions resources/js/ssr.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSSRApp, h } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { createInertiaApp } from '@inertiajs/inertia-vue3'
import createServer from '@inertiajs/server'
import { createInertiaApp } from '@inertiajs/vue3'
import createServer from '@inertiajs/vue3/server'

createServer((page) => createInertiaApp({
page,
Expand Down

0 comments on commit 36e721f

Please sign in to comment.