Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
konneki committed Jun 20, 2020
1 parent f5185ce commit 0472892
Show file tree
Hide file tree
Showing 13 changed files with 158 additions and 47 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
.DS_Store
dist
layout
12 changes: 12 additions & 0 deletions src/assets/img/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/img/dark_theme.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/img/glass_with_water.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/img/info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/img/info_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions src/assets/img/light_theme.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/img/slice1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/img/subtract.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 0 additions & 12 deletions src/pages/another.html

This file was deleted.

16 changes: 13 additions & 3 deletions src/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
@import "~normalize.css";
@import '~normalize.css';

@import "_variables";
@import "modules/hello.scss";
@import '_variables';
@import 'modules/hello.scss';

html {
box-sizing: border-box;
}

*,
*::after,
*::before {
box-sizing: inherit;
}

body {
background: $wtf;
Expand Down
4 changes: 2 additions & 2 deletions src/scss/modules/hello.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
height: 220px;
background: rgba(0, 0, 0, 0.1);
border-radius: 50%;
content: "";
content: '';
display: block;
z-index: 1;
animation: circles 17s ease-out infinite;
Expand All @@ -56,7 +56,7 @@
height: 220px;
background: rgba(0, 0, 0, 0.1);
border-radius: 50%;
content: "";
content: '';
display: block;
z-index: 1;
animation: circles 20s ease-in infinite;
Expand Down
51 changes: 21 additions & 30 deletions webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
/* here you can define another js file */
entry: {
index: "./src/js/index.js",
another: "./src/js/another.js",
index: './src/js/index.js',
},
output: {
filename: "[name].[hash:8].js",
path: __dirname + "/dist",
filename: '[name].[hash:8].js',
path: __dirname + '/dist',
},
module: {
rules: [
{
test: [/.js$/],
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
loader: 'babel-loader',
options: {
presets: ["@babel/preset-env"],
presets: ['@babel/preset-env'],
},
},
},
{
test: /\.html$/i,
loader: "html-loader",
loader: 'html-loader',
options: {
attributes: {
list: [
{
tag: "img",
attribute: "src",
type: "src",
tag: 'img',
attribute: 'src',
type: 'src',
},
{
tag: "img",
attribute: "data-gallery-src",
type: "src",
tag: 'img',
attribute: 'data-gallery-src',
type: 'src',
},
],
},
Expand All @@ -47,9 +46,9 @@ module.exports = {
test: /\.(png|jpe?g|gif|svg)$/i,
use: [
{
loader: "file-loader",
loader: 'file-loader',
options: {
name: "img/[name].[hash:8].[ext]",
name: 'img/[name].[hash:8].[ext]',
},
},
],
Expand All @@ -65,28 +64,20 @@ module.exports = {
new CopyWebpackPlugin({
patterns: [
{
from: "public",
from: 'public',
globOptions: {
ignore: [
'**/*.DS_Store'
],
ignore: ['**/*.DS_Store'],
},
},
],
}),

/* here you can define another html file and its dependencies */
new HtmlWebpackPlugin({
template: "./src/pages/index.html",
inject: true,
chunks: ["index"],
filename: "index.html",
}),
new HtmlWebpackPlugin({
template: "./src/pages/another.html",
template: './src/pages/index.html',
inject: true,
chunks: ["index", "another"],
filename: "another.html",
chunks: ['index'],
filename: 'index.html',
}),
],
};

0 comments on commit 0472892

Please sign in to comment.