mirror of
https://github.com/cupcakearmy/old.nicco.io.git
synced 2024-10-31 16:14:14 +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:
|
||||
- name: build
|
||||
image: cupcakearmy/pnpm
|
||||
image: node:12-alpine
|
||||
pull: always
|
||||
commands:
|
||||
- node -v
|
||||
- pnpm --shamefully-flatten i
|
||||
- pnpm run build:prod
|
||||
- yarn
|
||||
- yarn run build
|
||||
|
||||
- name: deploy
|
||||
image: cupcakearmy/drone-deploy
|
||||
@ -22,7 +22,7 @@ steps:
|
||||
port: 1312
|
||||
target: /srv/web/home
|
||||
sources:
|
||||
- ./public
|
||||
- ./dist
|
||||
- ./docker-compose.prod.yml
|
||||
- ./nginx.conf
|
||||
commands:
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,9 @@
|
||||
node_modules
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
public
|
||||
.cache
|
||||
dist
|
||||
|
||||
.idea
|
||||
.vscode
|
@ -8,4 +8,4 @@ services:
|
||||
- 3000:80
|
||||
volumes:
|
||||
- ./nginx.conf:/usr/local/nginx/conf/sites/default.conf:ro
|
||||
- ./public:/srv:ro
|
||||
- ./dist:/srv:ro
|
41
package.json
41
package.json
@ -1,35 +1,22 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build:dev": "webpack -d",
|
||||
"build:dev:watch": "webpack -d -w",
|
||||
"build:prod": "webpack -p",
|
||||
"build:prod:watch": "webpack -p -w",
|
||||
"dev": "webpack-dev-server -d"
|
||||
"build": "parcel build ./src/index.html",
|
||||
"dev": "parcel ./src/index.html"
|
||||
},
|
||||
"dependencies": {
|
||||
"animejs": "~3",
|
||||
"react": "~16",
|
||||
"react-dom": "~16",
|
||||
"react-router-dom": "~5"
|
||||
"animejs": "3.x",
|
||||
"parcel-bundler": "1.x",
|
||||
"react": "16.12.x",
|
||||
"react-dom": "16.12.x",
|
||||
"react-router-dom": "5.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/animejs": "3",
|
||||
"@types/react": "~16",
|
||||
"@types/react-dom": "~16",
|
||||
"@types/react-router-dom": "~4",
|
||||
"awesome-typescript-loader": "~5",
|
||||
"copy-webpack-plugin": "~5",
|
||||
"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"
|
||||
"@types/animejs": "3.x",
|
||||
"@types/react": "16.9.x",
|
||||
"@types/react-dom": "16.9.x",
|
||||
"@types/react-router-dom": "5.x",
|
||||
"stylus": "0.54.x",
|
||||
"typescript": "3.7.x"
|
||||
}
|
||||
}
|
||||
}
|
@ -3,12 +3,12 @@
|
||||
"short_name": "nicco.io",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"src": "./android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-512x512.png",
|
||||
"src": "./android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
@ -16,4 +16,4 @@
|
||||
"theme_color": "#16b4e9",
|
||||
"background_color": "#16b4e9",
|
||||
"display": "standalone"
|
||||
}
|
||||
}
|
@ -7,18 +7,19 @@
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport">
|
||||
<meta name="Description" content="Author: cupcakearmy, Design: cupcakearmy">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#16b4e9">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="./Assets/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./Assets/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="./Assets/favicon-16x16.png">
|
||||
<link rel="manifest" href="./Assets/site.webmanifest">
|
||||
<link rel="mask-icon" href="./Assets/safari-pinned-tab.svg" color="#16b4e9">
|
||||
<meta name="apple-mobile-web-app-title" content="nicco.io">
|
||||
<meta name="application-name" content="nicco.io">
|
||||
<meta name="theme-color" content="#16b4e9">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<div id="root"></div>
|
||||
<script src="./index.tsx"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,2 +1,2 @@
|
||||
@require './vendor/fonts/import.css'
|
||||
@require './vendor/fonts/import'
|
||||
@require './styles/*'
|
@ -4,14 +4,16 @@ import ReactDOM from 'react-dom'
|
||||
import App from './App'
|
||||
import './index.styl'
|
||||
|
||||
// Favicons
|
||||
import './Assets/favicon.ico'
|
||||
import './Assets/favicon-16x16.png'
|
||||
import './Assets/favicon-32x32.png'
|
||||
import './Assets/apple-touch-icon.png'
|
||||
import './Assets/site.webmanifest'
|
||||
import './Assets/android-chrome-192x192.png'
|
||||
import './Assets/android-chrome-512x512.png'
|
||||
import './Assets/safari-pinned-tab.svg'
|
||||
//@ts-ignore
|
||||
const _paq = window._paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function () {
|
||||
var u = "//stats.nicco.io/";
|
||||
_paq.push(['setTrackerUrl', u + 'p_unicorns']);
|
||||
_paq.push(['setSiteId', '1']);
|
||||
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-family: 'Inconsolata';
|
||||
src: url('./Inconsolata-Regular.woff2') format('woff2');
|
||||
src: url('vendor/fonts/Inconsolata-Regular.woff2') format('woff2');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
@font-face {
|
||||
font-family: 'Merriweather';
|
||||
src: url('./Merriweather-Regular.woff2') format('woff2');
|
||||
src: url('vendor/fonts/Merriweather-Regular.woff2') format('woff2');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inconsolata';
|
||||
src: url('./Inconsolata-Bold.woff2') format('woff2');
|
||||
src: url('vendor/fonts/Inconsolata-Bold.woff2') format('woff2');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
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