fix(web): remove warning creating package
@ -1,6 +1,6 @@
|
||||
{
|
||||
"packages/**/*.{js,ts}": [
|
||||
"prettier --loglevel=silent --write",
|
||||
"yarn lint"
|
||||
"bash -c 'yarn lint'"
|
||||
]
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
"build": "rimraf build && tsc",
|
||||
"dev": "nodemon",
|
||||
"lint": "eslint src/**/*.ts --fix",
|
||||
"prepare": "husky install",
|
||||
"start": "NODE_PATH=build node build/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
19
packages/web/package.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "web",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"build": "rimraf build && sh scripts/build.sh",
|
||||
"start": "NODE_PATH=build serve build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"minify": "^8.0.4",
|
||||
"rimraf": "^3.0.2",
|
||||
"serve": "^13.0.2",
|
||||
"tailwindcss": "^3.0.24"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
},
|
||||
"packageManager": "yarn@3.2.0",
|
||||
"license": "MIT"
|
||||
}
|
20
packages/web/scripts/build.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
input="./src"
|
||||
output="./build"
|
||||
|
||||
mkdir $output
|
||||
|
||||
for file in $(find $input -name "*.css" -o -name "*.html" -o -name "*.js" | sed "s|^$input/||"); do
|
||||
input_file="$input/$file"
|
||||
output_file="$output/$file"
|
||||
|
||||
mkdir -p "${output_file%/*}" && touch "$output_file"
|
||||
yarn minify $input_file > $output_file
|
||||
done
|
||||
|
||||
yarn tailwindcss -i "$input/index.css" -o "$output/index.css"
|
||||
yarn minify "$output/index.css" > "$output/index-1.css"
|
||||
rm -rf "$output/index.css"
|
||||
mv "$output/index-1.css" "$output/index.css"
|
||||
cp -nR "$input/." $output
|
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 641 B |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
3
packages/web/src/index.css
Normal file
@ -0,0 +1,3 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
@ -36,50 +36,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="icon" type="image/png" href="/images/favicon.png" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter" />
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
backgroundSize: {
|
||||
...tailwind.defaultTheme.backgroundSize,
|
||||
'2x': '200%',
|
||||
},
|
||||
extend: {
|
||||
animation: {
|
||||
gradient: 'gradient 3s ease infinite',
|
||||
},
|
||||
colors: {
|
||||
'chrome-1': '#fe4e40',
|
||||
'chrome-2': '#008cf8',
|
||||
'chrome-3': '#01a258',
|
||||
'edge-1': '#197bc4',
|
||||
'edge-2': '#2ec2e0',
|
||||
'edge-3': '#52dc6c',
|
||||
'firefox-1': '#fe3b45',
|
||||
'firefox-2': '#775aea',
|
||||
'firefox-3': '#fee545',
|
||||
primary: '#3dd9eb',
|
||||
secondary: '#34495e',
|
||||
},
|
||||
fontFamily: {
|
||||
sans: ['Inter', ...tailwind.defaultTheme.fontFamily.sans],
|
||||
},
|
||||
keyframes: {
|
||||
gradient: {
|
||||
'0%, 100%': {
|
||||
'background-size': '200% 200%',
|
||||
'background-position': 'left center',
|
||||
},
|
||||
'50%': {
|
||||
'background-size': '200% 200%',
|
||||
'background-position': 'right center',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<link rel="stylesheet" href="/index.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
45
packages/web/tailwind.config.js
Normal file
@ -0,0 +1,45 @@
|
||||
const defaultTheme = require('tailwindcss/defaultTheme');
|
||||
|
||||
module.exports = {
|
||||
content: ['./src/**/*.{html,js}'],
|
||||
theme: {
|
||||
backgroundSize: {
|
||||
...defaultTheme.backgroundSize,
|
||||
'2x': '200%',
|
||||
},
|
||||
extend: {
|
||||
animation: {
|
||||
gradient: 'gradient 3s ease infinite',
|
||||
},
|
||||
colors: {
|
||||
'chrome-1': '#fe4e40',
|
||||
'chrome-2': '#008cf8',
|
||||
'chrome-3': '#01a258',
|
||||
'edge-1': '#197bc4',
|
||||
'edge-2': '#2ec2e0',
|
||||
'edge-3': '#52dc6c',
|
||||
'firefox-1': '#fe3b45',
|
||||
'firefox-2': '#775aea',
|
||||
'firefox-3': '#fee545',
|
||||
primary: '#3dd9eb',
|
||||
secondary: '#34495e',
|
||||
},
|
||||
fontFamily: {
|
||||
sans: ['Inter', ...defaultTheme.fontFamily.sans],
|
||||
},
|
||||
keyframes: {
|
||||
gradient: {
|
||||
'0%, 100%': {
|
||||
'background-size': '200% 200%',
|
||||
'background-position': 'left center',
|
||||
},
|
||||
'50%': {
|
||||
'background-size': '200% 200%',
|
||||
'background-position': 'right center',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
};
|