Skip to content

Instantly share code, notes, and snippets.

View gkatsanos's full-sized avatar

George Katsanos gkatsanos

View GitHub Profile
import groupby from 'https://esm.sh/lodash.groupby'
import moment from 'https://esm.sh/moment'
import { Transaction } from '../types.ts'
export function calculateTransactionTotals(content: Transaction[]) {
groupTransactionsByUserAndCurrency(content)
return prepareData(groupTransactionsByUserAndCurrency(content), content)
}
const calculateTotalAmountsPerCurrency = (transactions) => {
const path = require('path');
const utils = require('./utils');
const webpack = require('webpack');
const config = require('../config');
const merge = require('webpack-merge');
const baseWebpackConfig = require('./webpack.base.conf');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCSSExtractPlugin = require('mini-css-extract-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin');
const path = require('path');
const utils = require('./utils');
const config = require('../config');
const { VueLoaderPlugin } = require('vue-loader');
const DirectoryNamedWebpackPlugin = require('directory-named-webpack-plugin');
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
@gkatsanos
gkatsanos / webpack.prd.conf.js
Created May 3, 2018 09:47
Webpack.prd.conf - Problem with naming chunks
const path = require('path');
const utils = require('./utils');
const webpack = require('webpack');
const config = require('../config');
const merge = require('webpack-merge');
const baseWebpackConfig = require('./webpack.base.conf');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCSSExtractPlugin = require('mini-css-extract-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin');
@gkatsanos
gkatsanos / webpack.base.conf.js
Created May 3, 2018 09:45
Webpack.base.conf - Problem with naming chunks
const path = require('path');
const utils = require('./utils');
const config = require('../config');
const { VueLoaderPlugin } = require('vue-loader');
const DirectoryNamedWebpackPlugin = require('directory-named-webpack-plugin');
function resolve(dir) {
return path.join(__dirname, '..', dir)
}
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
const exclude = /node_modules/;
const webpack = require('webpack');
module.exports = {
entry: {
"js/bundle": "./js/src/main",
"css/main": "./sass/main.scss",
"css/frontpage": "./sass/frontpage.scss"
@gkatsanos
gkatsanos / webpack.config.dev.js
Created April 22, 2017 22:26
The Webpack-dev-server is not writing files to disk
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
const exclude = /node_modules/;
module.exports = {
entry: {
"js/bundle": "./js/src/main",
"css/main": "./sass/main.scss",
"css/frontpage": "./sass/frontpage.scss"
},
{% macro menu_links(items, attributes, menu_level, current_path) %}
{% import _self as menus %}
{% if items %}
{% if menu_level != 0 %}
<ul class="list-unstyled font-title font-small text-capitalize line-height-l level-{{ menu_level }}">
{% endif %}
{% for i, item in items %}
{% if menu_level == 0 %}
<div class="col-sm-3">
const isElementInViewport = function (el) {
let rect = el.getBoundingClientRect()
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
)
}
// your variables file - here you can override bootstrap variables as well as create your own
@import "variables.scss";
// the bootstrap source
@import "bootstrap-custom";
@import "base/responsive_mixin";
@import "base/button";
@import "base/panels";
@import "base/helpers";