const curring = (...initArgs) => {
let sum = 0;
const curried = (...args) => {
sum = args.reduce((a, b) => a + b, sum);
return curried;
};
curried.valueOf = () => sum;
return curried(...initArgs);
};
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ImageMinPlugin = require('imagemin-webpack-plugin');
const extractHTML = new ExtractTextPlugin('index.html');
const extractCSS = new ExtractTextPlugin('css/style.css');
const conf = {
//context: path.resolve(__dirname, 'dist'),
entry: [
'./src/js/app.js',
'./src/slim/index.slim',
'./src/scss/style.scss'
],
output: {
path: path.resolve(__dirname, './dist'),
filename: 'js/build.js',
},
devServer: {
overlay: true
},
module: {
rules: [
{
test: /\.slim$/,
use: extractHTML.extract({
use: [
{
loader: 'html-loader',
options: {
minimize: false
}
},{
loader: 'slim-lang-loader',
options: {
slimOptions: {
//'pretty': true
}
}
}
]
})
},{
test: /\.scss$/,
use: extractCSS.extract({
use: [
{
loader: 'css-loader',
options: {sourceMap: true}
},{
loader: 'postcss-loader',
options: {sourceMap: true}
},{
loader: 'sass-loader',
options: {sourceMap: true}
}
],
fallback: 'style-loader'
})
},{
test: /\.(png|gif|jpe?g)$/,
loaders: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: './images/'
},
},
'img-loader',
]
},{
test: /\.svg$/,
use: [
{
loader: 'svg-url-loader',
options: {
encoding: 'base64'
}
},{
loader: 'svgo-loader',
options: {
plugins: [
{
removeViewBox: false
}
]
}
},
]
}
]
},
plugins: [
new CleanWebpackPlugin(['dist']),
extractHTML,
extractCSS,
new CopyWebpackPlugin (
[
{from: './src/images', to: 'images'}
], {
ignore : [
{glob: 'svg/*'}
]
}
)
]
};
module.exports = conf;
console.log(str.match(/(?<=:).*$/mg).map(match => match.trim()))
str.match()
Что-то скобочные группы не работают в глобальном поиске
и не подскажите где про это почитать в доках?
Метод match() возвращает получившиеся совпадения при сопоставлении строки с регулярным выражением.
module TelegramAddNotification
extend ActiveSupport::Concern
included do
context_handler ...
end
end
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" style="margin: 0; background: #0382Ce; border-radius: 2px;">
<tr>
<td width="19" style="width: 19px;"> </td>
<td style="height: 38px;">
<a href="#" style="height: 38px; text-align: center; font-family: Arial, Tahoma, Geneva, sans-serif; font-size: 12px; line-height: 38px; text-decoration: none; padding: 0; display: block; border-radius: 4px;">
<font face="Arial, sans-serif" color="#ffffff" style="font-size: 12px; line-height: 38px;">
<span style="font-family: Arial, Tahoma, Geneva, sans-serif; color: #ffffff; font-size: 12px; line-height: 38px; font-weight: bold; letter-spacing: 0.05em; -webkit-text-size-adjust:none;">ПОДРОБНОСТИ НА ПЛОЩАДКЕ</span>
</font>
</a>
</td>
<td width="19" style="width: 19px;"> </td>
</tr>
</table>
<table style="width: 100%; border-collapse: collapse; padding: 10px 20px; font-family: -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif; color: #333333; text-align: center;">
<thead>
<tr>
<th colspan="7" style="padding: 15px 0; font-size: 19px; font-weight: bold;">
Currency rate changes
</th>
</tr>
</thead>
<tbody>
<tr class="tr">
<td class="td">Currency pair</td>
<td class="td">Exchanges</td>
<td class="td">Direction</td>
<td class="td">Accounting price</td>
<td class="td">Current price</td>
<td class="td">±</td>
<td class="td">%</td>
</tr>
</tbody>
</table>
th {
border:none;
}
.tr {
background-color: #e2e2e2;
height: 50px;
padding: 10px;
}
.td {
border: 1px dotted #777;
border-right: none;
}
.td:first-child {
height: 50px;
}
.td:last-child {
border-right: 1px dotted #777;
}
th {
border:none;
background-image: linear-gradient(to right, black 33%, rgba(255,255,255,0) 0%);
background-position: bottom;
background-size: 3px 1px;
background-repeat: repeat-x;
}
.tr {
background-color: #e2e2e2;
height: 50px;
padding: 10px;
}
.td {
background-image: linear-gradient(black 33%, rgba(255,255,255,0) 0%);
background-position: right;
background-size: 1px 3px;
background-repeat: repeat-y;
border-bottom:1px dotted #777;
}
.td:first-child {
height: 50px;
border-left: 1px dotted #777;
}
.td:last-child {
border-right: 1px dotted #777;
}
build:
context: .
args:
APP_HOME: $APP_HOME
То есть куда кладет файлы certbot - оттуда берет и nginx