mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-03-21 17:24:37 -05:00
Initial commit
This commit is contained in:
commit
bc207534d7
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
* text=auto
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
node_modules
|
||||
public/*
|
||||
33
package.json
Normal file
33
package.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "webpack",
|
||||
"watch": "npm run dev -- --watch",
|
||||
"build": "webpack -p --env production",
|
||||
"serve": "webpack-dev-server"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-core": "^6.25.0",
|
||||
"babel-loader": "^7.1.1",
|
||||
"babel-preset-env": "^1.6.0",
|
||||
"babel-preset-stage-2": "^6.24.1",
|
||||
"bulma": "^0.5.0",
|
||||
"clean-webpack-plugin": "^0.1.16",
|
||||
"css-loader": "^0.28.4",
|
||||
"extract-text-webpack-plugin": "^3.0.0",
|
||||
"favicons-webpack-plugin": "^0.0.7",
|
||||
"file-loader": "^0.11.2",
|
||||
"html-loader": "^0.5.0",
|
||||
"html-webpack-plugin": "^2.30.1",
|
||||
"node-sass": "^4.5.3",
|
||||
"purify-css": "^1.2.5",
|
||||
"purifycss-webpack": "^0.7.0",
|
||||
"sass-loader": "^6.0.6",
|
||||
"style-loader": "^0.18.2",
|
||||
"vue": "^2.4.2",
|
||||
"vue-loader": "^13.0.2",
|
||||
"vue-template-compiler": "^2.4.2",
|
||||
"webpack": "^3.4.1",
|
||||
"webpack-dev-server": "^2.6.1"
|
||||
}
|
||||
}
|
||||
13
readme.md
Normal file
13
readme.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# splatoon2.ink
|
||||
|
||||
## Development
|
||||
|
||||
```shell
|
||||
yarn serve
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
```shell
|
||||
yarn build
|
||||
```
|
||||
1
src/css/_variables.scss
Normal file
1
src/css/_variables.scss
Normal file
|
|
@ -0,0 +1 @@
|
|||
@import '~bulma/sass/utilities/initial-variables';
|
||||
2
src/css/main.scss
Normal file
2
src/css/main.scss
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@import './variables';
|
||||
@import '~bulma';
|
||||
13
src/html/index.html
Normal file
13
src/html/index.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>splatoon2.ink</title>
|
||||
<meta name="description" content="Splatoon 2 map schedules">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
14
src/js/components/App.vue
Normal file
14
src/js/components/App.vue
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
<div>
|
||||
splatoon2.ink
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
}
|
||||
</script>
|
||||
4
src/js/main.js
Normal file
4
src/js/main.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import Vue from 'vue';
|
||||
import App from './components/App.vue';
|
||||
|
||||
new Vue(App).$mount('#app');
|
||||
110
webpack.config.js
Normal file
110
webpack.config.js
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
const path = require('path');
|
||||
const glob = require('glob');
|
||||
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const PurifyCSSPlugin = require('purifycss-webpack');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin')
|
||||
|
||||
module.exports = function(env) {
|
||||
const production = (env === 'production');
|
||||
|
||||
return {
|
||||
entry: {
|
||||
main: [
|
||||
'./src/js/main.js',
|
||||
'./src/css/main.scss',
|
||||
],
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, './public'),
|
||||
filename: 'assets/js/[name].[chunkhash].js',
|
||||
},
|
||||
devtool: (production) ? false : 'inline-source-map',
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader'
|
||||
},
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader',
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: 'style-loader',
|
||||
publicPath: '../../',
|
||||
use: [
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: { sourceMap: !production },
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: { sourceMap: !production },
|
||||
},
|
||||
],
|
||||
}),
|
||||
},
|
||||
{
|
||||
test: /\.woff2?$|\.ttf$|\.eot$|\.svg$/,
|
||||
loader: 'file-loader?name=assets/fonts/[name].[hash].[ext]',
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif)$/,
|
||||
loader: 'file-loader?name=assets/img/[name].[hash].[ext]',
|
||||
},
|
||||
{
|
||||
test:/^favicon\.ico$/,
|
||||
loader: 'file-loader?name=favicon.ico',
|
||||
}
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
// Remove old files
|
||||
new CleanWebpackPlugin([
|
||||
'public/assets/css/*',
|
||||
'public/assets/js/*',
|
||||
]),
|
||||
// Extract CSS to a separate file
|
||||
new ExtractTextPlugin('assets/css/[name].[contenthash].css'),
|
||||
// Remove unused CSS styles
|
||||
new PurifyCSSPlugin({
|
||||
paths: [
|
||||
...glob.sync(path.join(__dirname, 'src/html/*.html')),
|
||||
...glob.sync(path.join(__dirname, 'src/js/components/*.vue')),
|
||||
],
|
||||
minimize: production,
|
||||
purifyOptions: {
|
||||
//whitelist: ['.tooltip'],
|
||||
},
|
||||
}),
|
||||
// Favicon
|
||||
// new FaviconsWebpackPlugin({
|
||||
// logo: './src/img/1f389.svg',
|
||||
// prefix: 'assets/icons/[hash:5]/',
|
||||
// background: '#333',
|
||||
// icons: {
|
||||
// 'android': true,
|
||||
// 'appleIcon': { offset: 15 },
|
||||
// 'appleStartup': false,
|
||||
// 'coast': false,
|
||||
// 'favicons': true,
|
||||
// 'firefox': false,
|
||||
// 'windows': true,
|
||||
// 'yandex': false,
|
||||
// }
|
||||
// }),
|
||||
// Build HTML
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: 'src/html/index.html',
|
||||
minify: { collapseWhitespace: true },
|
||||
}),
|
||||
],
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user