Skip to content

Commit

Permalink
Inertia v1.2.0 Release
Browse files Browse the repository at this point in the history
Inertia v1.2.0
  • Loading branch information
onlycs authored Jul 14, 2022
2 parents 2526ddc + 6a10a80 commit 1102c74
Show file tree
Hide file tree
Showing 70 changed files with 4,270 additions and 7,601 deletions.
20 changes: 0 additions & 20 deletions .babelrc

This file was deleted.

3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
src/config/config.js
src/config/config.js
public/uv
35 changes: 0 additions & 35 deletions .eslintrc.json

This file was deleted.

51 changes: 51 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
extends:
- eslint:recommended
- next/core-web-vitals

plugins:
- react
- import
- simple-import-sort

env:
browser: true
es2021: true
node: true

rules:
indent:
- warn
- tab

quotes:
- warn
- single

semi:
- error
- always

no-unused-vars: off
no-undef: off
no-constant-condition: off
no-self-assign: off
no-empty: off

react/jsx-sort-props:
- warn
- shorthandLast: true
noSortAlphabetically: false
reservedFirst: true

import/first: warn
import/exports-last: warn
import/no-duplicates: warn
import/no-unresolved: off

import/newline-after-import:
- warn
- count: 2

sort-imports:
- warn
- allowSeparatedGroups: true
25 changes: 25 additions & 0 deletions .gh-builder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const exec = require('child_process').exec;
const provider = process.argv[2];

const defaultHandler = (err, stdout, stderr) => {
if (err) {
console.error(err);
return;
}
console.log(stdout);
console.log(stderr);
};

const fs = require('fs');
const fileName = './src/config/config.json';
const file = require(fileName);

file.prefix = '/inertia-client';

fs.writeFile(fileName, JSON.stringify(file), function writeJSON(err) {
if (err) return console.log(err);
console.log(JSON.stringify(file, null, 4));
console.log('writing to ' + fileName);
});

exec('npm run build', defaultHandler);
11 changes: 0 additions & 11 deletions .gh-pages-setup.js

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/inertia-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ jobs:
- name: Install yarn
run: corepack enable

- name: Config (Prefix)
run: yarn run gh-pages-config

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build
run: yarn build:github

- name: Export
run: yarn export
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "public/uv"]
path = public/uv
url = https://github.com/inertia-unblocker/uv-scripts
41 changes: 35 additions & 6 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
/** @type {import('next').NextConfig} */
const config = require('./src/config/config.json');
const path = require('path');

module.exports = {
webpack: (config, options) => {
config.experiments = {
topLevelAwait: true,
layers: true,
};
return config;
webpack: (config) => {
config.experiments = {
topLevelAwait: true,
layers: true,
};
config.resolve.alias = {
...config.resolve.alias,
"@theme": path.resolve(__dirname, 'src/components/theme'),
"@navigation": path.resolve(__dirname, 'src/components/navigation'),
"@elements": path.resolve(__dirname, 'src/components/elements'),
"@utils": path.resolve(__dirname, 'src/utils'),
"@css": path.resolve(__dirname, 'src/css'),
"@config": path.resolve(__dirname, 'src/config/config.json'),
}

return config;
},
basePath: config.prefix,
assetPrefix: config.prefix,
async headers() {
return [
{
// matching all API routes
source: '/api/:path*',
headers: [
{ key: 'Access-Control-Allow-Credentials', value: 'true' },
{ key: 'Access-Control-Allow-Origin', value: '*' },
{ key: 'Access-Control-Allow-Methods', value: 'GET,OPTIONS,PATCH,DELETE,POST,PUT' },
{
key: 'Access-Control-Allow-Headers',
value:
'X-CSRF-Token, X-Requested-With, Accept, Authorization, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version',
},
],
}
];
}
};
72 changes: 34 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
{
"name": "inertia-client",
"private": false,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"export": "next export",
"update": "yarn upgrade --latest",
"gh-pages-config": "node ./.gh-pages-setup.js"
},
"dependencies": {
"@nextui-org/react": "^1.0.0-beta.6",
"axios": "^0.27.1",
"imagemin-mozjpeg": "^10.0.0",
"next": "^12.1.0",
"next-themes": "^0.1.1",
"react": "^17.0.2",
"react-bootstrap": "^2.3.0",
"react-cookie": "^4.1.1",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
"responsive-loader": "^2.3.0",
"sharp": "^0.30.1",
"tld-enum": "^2.0.6",
"webp-loader": "^0.6.0"
},
"devDependencies": {
"@swc/core": "^1.2.172",
"@types/node": "17.0.29",
"@types/react": "18.0.8",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "8.14.0",
"eslint-config-next": "12.1.5",
"typescript": "4.6.3"
},
"license": "GPL-3.0"
}
"name": "inertia-client",
"private": false,
"scripts": {
"dev": "next dev",
"build": "next build",
"build:github": "node ./.gh-builder.js",
"start": "next start",
"lint": "next lint",
"export": "next export",
"update": "yarn upgrade --latest"
},
"dependencies": {
"@nextui-org/react": "^1.0.0-beta.9",
"next": "^12.1.0",
"next-themes": "^0.2.0",
"react": "^17.0.2",
"react-bootstrap": "^2.3.0",
"react-cookie": "^4.1.1",
"react-device-detect": "^2.2.2",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
"validator": "^13.7.0"
},
"devDependencies": {
"@types/node": "17.0.42",
"@types/react": "18.0.12",
"eslint": "8.17.0",
"eslint-config-next": "12.1.6",
"eslint-import-resolver-typescript": "^3.2.5",
"eslint-plugin-import": "^2.26.0",
"typescript": "4.7.3"
},
"license": "GPL-3.0"
}
Loading

0 comments on commit 1102c74

Please sign in to comment.