mirror of
https://github.com/cupcakearmy/old.nicco.io.git
synced 2024-11-01 00:24:16 +01:00
Merge pull request #1 from cupcakearmy/next
added matomo and moved to yarn & parcel
This commit is contained in:
commit
ad9cd3d0c8
@ -3,12 +3,12 @@ name: default
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: cupcakearmy/pnpm
|
image: node:12-alpine
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- node -v
|
- node -v
|
||||||
- pnpm --shamefully-flatten i
|
- yarn
|
||||||
- pnpm run build:prod
|
- yarn run build
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: cupcakearmy/drone-deploy
|
image: cupcakearmy/drone-deploy
|
||||||
@ -22,7 +22,7 @@ steps:
|
|||||||
port: 1312
|
port: 1312
|
||||||
target: /srv/web/home
|
target: /srv/web/home
|
||||||
sources:
|
sources:
|
||||||
- ./public
|
- ./dist
|
||||||
- ./docker-compose.prod.yml
|
- ./docker-compose.prod.yml
|
||||||
- ./nginx.conf
|
- ./nginx.conf
|
||||||
commands:
|
commands:
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,9 @@
|
|||||||
node_modules
|
node_modules
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
public
|
public
|
||||||
|
.cache
|
||||||
|
dist
|
||||||
|
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
@ -8,4 +8,4 @@ services:
|
|||||||
- 3000:80
|
- 3000:80
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/usr/local/nginx/conf/sites/default.conf:ro
|
- ./nginx.conf:/usr/local/nginx/conf/sites/default.conf:ro
|
||||||
- ./public:/srv:ro
|
- ./dist:/srv:ro
|
39
package.json
39
package.json
@ -1,35 +1,22 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:dev": "webpack -d",
|
"build": "parcel build ./src/index.html",
|
||||||
"build:dev:watch": "webpack -d -w",
|
"dev": "parcel ./src/index.html"
|
||||||
"build:prod": "webpack -p",
|
|
||||||
"build:prod:watch": "webpack -p -w",
|
|
||||||
"dev": "webpack-dev-server -d"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"animejs": "~3",
|
"animejs": "3.x",
|
||||||
"react": "~16",
|
"parcel-bundler": "1.x",
|
||||||
"react-dom": "~16",
|
"react": "16.12.x",
|
||||||
"react-router-dom": "~5"
|
"react-dom": "16.12.x",
|
||||||
|
"react-router-dom": "5.x"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/animejs": "3",
|
"@types/animejs": "3.x",
|
||||||
"@types/react": "~16",
|
"@types/react": "16.9.x",
|
||||||
"@types/react-dom": "~16",
|
"@types/react-dom": "16.9.x",
|
||||||
"@types/react-router-dom": "~4",
|
"@types/react-router-dom": "5.x",
|
||||||
"awesome-typescript-loader": "~5",
|
"stylus": "0.54.x",
|
||||||
"copy-webpack-plugin": "~5",
|
"typescript": "3.7.x"
|
||||||
"css-loader": "~3",
|
|
||||||
"file-loader": "~4",
|
|
||||||
"html-webpack-plugin": "~3",
|
|
||||||
"mini-css-extract-plugin": "~0",
|
|
||||||
"style-loader": "~1",
|
|
||||||
"stylus": "~0",
|
|
||||||
"stylus-loader": "~3",
|
|
||||||
"typescript": "~3",
|
|
||||||
"webpack": "~4",
|
|
||||||
"webpack-cli": "~3",
|
|
||||||
"webpack-dev-server": "~3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,12 +3,12 @@
|
|||||||
"short_name": "nicco.io",
|
"short_name": "nicco.io",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "/android-chrome-192x192.png",
|
"src": "./android-chrome-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "/android-chrome-512x512.png",
|
"src": "./android-chrome-512x512.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png"
|
"type": "image/png"
|
||||||
}
|
}
|
||||||
|
@ -7,18 +7,19 @@
|
|||||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||||
<meta name="Description" content="Author: cupcakearmy, Design: cupcakearmy">
|
<meta name="Description" content="Author: cupcakearmy, Design: cupcakearmy">
|
||||||
|
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="./Assets/apple-touch-icon.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="./Assets/favicon-32x32.png">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="./Assets/favicon-16x16.png">
|
||||||
<link rel="manifest" href="/site.webmanifest">
|
<link rel="manifest" href="./Assets/site.webmanifest">
|
||||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#16b4e9">
|
<link rel="mask-icon" href="./Assets/safari-pinned-tab.svg" color="#16b4e9">
|
||||||
<meta name="apple-mobile-web-app-title" content="nicco.io">
|
<meta name="apple-mobile-web-app-title" content="nicco.io">
|
||||||
<meta name="application-name" content="nicco.io">
|
<meta name="application-name" content="nicco.io">
|
||||||
<meta name="theme-color" content="#16b4e9">
|
<meta name="theme-color" content="#16b4e9">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
<script src="./index.tsx"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,2 +1,2 @@
|
|||||||
@require './vendor/fonts/import.css'
|
@require './vendor/fonts/import'
|
||||||
@require './styles/*'
|
@require './styles/*'
|
@ -4,14 +4,16 @@ import ReactDOM from 'react-dom'
|
|||||||
import App from './App'
|
import App from './App'
|
||||||
import './index.styl'
|
import './index.styl'
|
||||||
|
|
||||||
// Favicons
|
//@ts-ignore
|
||||||
import './Assets/favicon.ico'
|
const _paq = window._paq || [];
|
||||||
import './Assets/favicon-16x16.png'
|
_paq.push(['trackPageView']);
|
||||||
import './Assets/favicon-32x32.png'
|
_paq.push(['enableLinkTracking']);
|
||||||
import './Assets/apple-touch-icon.png'
|
(function () {
|
||||||
import './Assets/site.webmanifest'
|
var u = "//stats.nicco.io/";
|
||||||
import './Assets/android-chrome-192x192.png'
|
_paq.push(['setTrackerUrl', u + 'p_unicorns']);
|
||||||
import './Assets/android-chrome-512x512.png'
|
_paq.push(['setSiteId', '1']);
|
||||||
import './Assets/safari-pinned-tab.svg'
|
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
|
||||||
|
g.type = 'text/javascript'; g.async = true; g.defer = true; g.src = u + 'j_unicorns'; s.parentNode.insertBefore(g, s);
|
||||||
|
})();
|
||||||
|
|
||||||
ReactDOM.render(<App/>, document.getElementById('root'))
|
ReactDOM.render(<App />, document.getElementById('root'))
|
@ -1,6 +1,6 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Inconsolata';
|
font-family: 'Inconsolata';
|
||||||
src: url('./Inconsolata-Regular.woff2') format('woff2');
|
src: url('vendor/fonts/Inconsolata-Regular.woff2') format('woff2');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Merriweather';
|
font-family: 'Merriweather';
|
||||||
src: url('./Merriweather-Regular.woff2') format('woff2');
|
src: url('vendor/fonts/Merriweather-Regular.woff2') format('woff2');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Inconsolata';
|
font-family: 'Inconsolata';
|
||||||
src: url('./Inconsolata-Bold.woff2') format('woff2');
|
src: url('vendor/fonts/Inconsolata-Bold.woff2') format('woff2');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
@ -1,65 +0,0 @@
|
|||||||
const path = require('path')
|
|
||||||
|
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
||||||
const CopyPlugin = require('copy-webpack-plugin')
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
entry: [
|
|
||||||
'./index.tsx',
|
|
||||||
],
|
|
||||||
output: {
|
|
||||||
filename: 'bundle.js',
|
|
||||||
path: path.resolve(__dirname, 'public'),
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
||||||
},
|
|
||||||
context: path.resolve(__dirname, 'src'),
|
|
||||||
devServer: {
|
|
||||||
contentBase: path.resolve(__dirname, 'public/assets'),
|
|
||||||
historyApiFallback: true,
|
|
||||||
open: false,
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
template: 'index.html',
|
|
||||||
}),
|
|
||||||
new MiniCssExtractPlugin({
|
|
||||||
filename: 'bundle.css',
|
|
||||||
}),
|
|
||||||
new CopyPlugin([
|
|
||||||
{ from: 'Static/robots.txt', to: '.' },
|
|
||||||
]),
|
|
||||||
],
|
|
||||||
stats: {
|
|
||||||
assets: true,
|
|
||||||
assetsSort: 'size',
|
|
||||||
all: false,
|
|
||||||
errors: true,
|
|
||||||
colors: true,
|
|
||||||
performance: true,
|
|
||||||
timings: true,
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [{
|
|
||||||
test: /\.tsx?$/,
|
|
||||||
loader: 'awesome-typescript-loader',
|
|
||||||
}, {
|
|
||||||
test: /\.css$/,
|
|
||||||
use: [MiniCssExtractPlugin.loader, 'css-loader'],
|
|
||||||
}, {
|
|
||||||
test: /\.styl$/,
|
|
||||||
use: [MiniCssExtractPlugin.loader, 'css-loader', 'stylus-loader'],
|
|
||||||
}, {
|
|
||||||
test: /\.(jpg|png|gif|svg|woff2?|ttf|eot|svg|otf|ico|webmanifest)$/,
|
|
||||||
use: [{
|
|
||||||
loader: 'file-loader',
|
|
||||||
options: {
|
|
||||||
name: '[name].[ext]',
|
|
||||||
outputPath: './',
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
}],
|
|
||||||
},
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user