Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
dist
build
.next
.vite
*.min.js
*.min.css
package-lock.json
.git
.husky

10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"arrowParens": "always",
"endOfLine": "lf"
}
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# softnanolab.github.io
SoftNanoLab Website.
# SoftNanoLab Website

React + Vite site for SoftNanoLab published to GitHub Pages with a custom domain.

## Prerequisites
- Node.js 20.x (matches the CI deploy workflow)
- npm (ships with Node)

## Install & Run Locally
- Install dependencies: `npm ci`
- Start dev server: `npm run dev` (Vite will print the local URL, typically http://localhost:5173)
- Build for production: `npm run build` (output in `dist/`)
- Preview the production build locally: `npm run preview`

## Deploy
- Pushing to `main` triggers `.github/workflows/deploy.yml`, which builds the site and deploys `dist/` to GitHub Pages.
- You can also run the workflow manually from the GitHub Actions tab via **Run workflow**.
- The custom domain is set to `softnanolab.com` via the `CNAME` file; keep that file in the repository so the domain stays mapped after deploys.
64 changes: 64 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import prettier from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';

export default [
js.configs.recommended,
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
globals: {
document: 'readonly',
window: 'readonly',
console: 'readonly',
JSX: 'readonly',
},
},
plugins: {
react: react,
'react-hooks': reactHooks,
'@typescript-eslint': tseslint,
prettier: prettier,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
...prettierConfig.rules,
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/no-unescaped-entities': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'prettier/prettier': 'error',
},
},
{
ignores: [
'node_modules/**',
'dist/**',
'build/**',
'.vite/**',
'public/**',
'.husky/**',
'*.min.js',
'*.min.css',
],
},
];
Loading