mirror of
https://github.com/ivuorinen/generic-landing-page.git
synced 2026-03-22 21:03:49 +00:00
chore(lint): Clean up and linting
This commit is contained in:
44
.editorconfig
Normal file
44
.editorconfig
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
max_line_length = 160
|
||||||
|
tab_width = 2
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.css]
|
||||||
|
indent_size = 4
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
[{*.sass,*.scss}]
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.rng,*.tld,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul,phpunit.xml.dist}]
|
||||||
|
indent_size = 4
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
[{*.ats,*.cts,*.mts,*.ts}]
|
||||||
|
indent_size = 4
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
[{*.ctp,*.hphp,*.inc,*.module,*.php,*.php4,*.php5,*.phtml,application,branch-usage-checker}]
|
||||||
|
indent_size = 4
|
||||||
|
max_line_length = 110
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.prettierrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
|
||||||
|
indent_size = 2
|
||||||
|
tab_width = 2
|
||||||
|
|
||||||
|
[{*.mk,GNUmakefile,makefile}]
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
[{*.tf,*.tfvars}]
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
[*.md,.github/workflows/*.yml]
|
||||||
|
max_line_length = 300
|
||||||
24
.github/workflows/npm.yml
vendored
24
.github/workflows/npm.yml
vendored
@@ -2,9 +2,9 @@ name: NPM Install and build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -13,16 +13,16 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [18.x]
|
node-version: [18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Generic landing page with some candy",
|
"description": "Generic landing page with some candy",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
|
||||||
"watch": "npx mix watch",
|
|
||||||
"build": "npx mix build",
|
"build": "npx mix build",
|
||||||
"dev": "npx mix build",
|
"dev": "npx mix build",
|
||||||
"prod": "npx mix build -p"
|
"prod": "npx mix build -p"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
const container = document.querySelector("h1");
|
const container = document.querySelector("h1");
|
||||||
const hostname = window.location.hostname || document.title;
|
const hostname = window.location.hostname || document.title;
|
||||||
|
|
||||||
container.textContent = hostname;
|
container.textContent = hostname;
|
||||||
document.title = hostname;
|
document.title = hostname;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,20 +1,16 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
|
||||||
<title>hi there!</title>
|
<title>hi there!</title>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<link href="app.css" rel="stylesheet" />
|
<link href="app.css" rel="stylesheet" />
|
||||||
<script src="app.js"></script>
|
<script src="app.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="h-screen bg-gray-50">
|
<body class="h-screen bg-gray-50">
|
||||||
<div class="flex items-center justify-between h-screen px-8 py-16 mx-auto min-w-max max-w-7xl">
|
<div class="flex items-center justify-between h-screen px-8 py-16 mx-auto min-w-max max-w-7xl">
|
||||||
<h1 class="text-3xl font-extrabold tracking-tight text-gray-900">
|
<h1 class="text-3xl font-extrabold tracking-tight text-gray-900">hi there!</h1>
|
||||||
hi there!
|
|
||||||
</h1>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
module.exports = {
|
export default {
|
||||||
content: ["./src/**/*.html", "./src/**/*.js"],
|
content: ["./src/index.html"],
|
||||||
theme: {
|
|
||||||
extend: {},
|
|
||||||
},
|
|
||||||
variants: {
|
|
||||||
extend: {},
|
|
||||||
},
|
|
||||||
plugins: [],
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
const mix = require('laravel-mix');
|
const mix = require("laravel-mix");
|
||||||
require('mix-tailwindcss');
|
require("mix-tailwindcss");
|
||||||
|
|
||||||
mix
|
mix
|
||||||
.setResourceRoot('src')
|
.setResourceRoot("src")
|
||||||
.setPublicPath('dist')
|
.setPublicPath("dist")
|
||||||
.browserSync()
|
.browserSync()
|
||||||
.disableSuccessNotifications();
|
.disableSuccessNotifications();
|
||||||
|
|
||||||
mix
|
mix
|
||||||
.js('src/app.js', 'dist')
|
.js("src/app.js", "dist")
|
||||||
.sass('src/app.scss', 'dist')
|
.sass("src/app.scss", "dist")
|
||||||
.tailwind()
|
.tailwind()
|
||||||
.copy('src/index.html', 'dist');
|
.copy("src/index.html", "dist");
|
||||||
|
|||||||
Reference in New Issue
Block a user