var storage = {
"id": "4",
"name": "Товар 4",
"price": "2500"
};
'use strict';
import _ from 'lodash';
import gulp from 'gulp';
import config from 'config';
const packagesPath = 'node_modules/';
const scripts = _.map(config.get('scriptAssets'), script => `${packagesPath}${script}/**`);
function assets() {
return gulp.src(scripts, {base: 'node_modules/'})
.pipe(gulp.dest(config.get('scriptAssetsPath')));
}
export default assets;
import gulp from 'gulp';
import assets from './builder/tasks/assets';
gulp.task('assets', assets);
{
resolve: {
modulesDirectories: [
'node_modules',
'src'
],
root: [],
extensions: ['', '.js', '.pug'],
alias: {
underscore: path.join(__dirname, 'node_modules/lodash/index')
}
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015', 'stage-0']
}
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint'
},
{
test: /\.json$/,
exclude: /node_modules/,
loader: 'json'
},
{
test: /\.pug$/,
loader: 'pug?root=templates'
},
{
test: /\.html$/,
loader: 'underscore-template-loader',
query: {
engine: 'lodash'
}
},
{
test: /\.less$/,
loader: ExtractTextPlugin.extract(cssConfig())
},
{
test: /\.(svg|png|jpg)$/,
exclude: /fonts/,
loader: `file?name=${config.get('pattern.file')}`
},
{
test: /fonts/,
exclude: /node_modules/,
loader: `file?name=${config.get('pattern.font')}`
}
]
},
}
var wanted = $('input.wpProQuiz_button').closest('div.activtest').show();
$('div.activtest').not(wanted).hide();
server {
listen [% $site.port %];
server_name www.[% $site.host %];
rewrite ^/?(.*) $scheme://[% $site.host %]/$1 permanent;
}
server {
listen [% $site.port %];
server_name www.[% $site.host %];
return 301 $scheme://[% $site.host %]$request_uri;
}