async function Default(cb) {
cl( chalk.black.bgGreen( "Default..." ) );
cl('\n');
var livereload_server = livereload.createServer();
let chokidar_settings = {
ignoreInitial: true,
usePolling: true,
interval: 200,
ignorePermissionErrors: true,
awaitWriteFinish: {
stabilityThreshold: 300,
pollInterval: 100
}
};
let process_css_path = [
'./project_www/assets/components/project/app2/scss/*.scss',
'./project_www/assets/components/project/test_360/scss/*.scss'
];
let process_css_path_ignored = [
];
let chokidar_settings_Process_CSS = {...chokidar_settings};
chokidar_settings_Process_CSS.ignored = process_css_path_ignored;
chokidar.watch( process_css_path, chokidar_settings_Process_CSS ).on('all', function (event, path) {
if( event == 'unlink' || event == 'unlinkDir' ) return;
Process_CSS(event, path);
path = path.replace('.scss', '.css');
path = 'D:/aera/' + path;
livereload_server.refresh( path );
});
function Process_CSS( event, path ){
cl( chalk.black.bgGreen( ` CSS Processing ${path} \n`) );
if( Fs.existsSync( path ) === false ){
cl( chalk.yellow( `Not exists: ${path} \n` ) );
return;
}
path = Path.resolve( path );
let scss_path = Path.dirname( path );
let scss_name = Path.parse( path ).name;
let out_css;
try{
out_css = sass.compile( path );
} catch(err){
cl( chalk.red( `${ err } \n` ) );
return;
}
out_css = out_css.css;
Fs.writeFileSync( scss_path + `/../css/${ scss_name }.css`, out_css, {encoding: 'utf8'} );
cl( chalk.black.bgGreen('...OK \n') );
};
my_map.geoObjects.each(function(ob){
if( ob.properties.get("ob_type") == "Point" ){
ob.options.set({iconColor: "#EAA6A5"});
ob.properties.set({active: false});
if( ob.properties.get("iconContent") == ptid ){
om_point = ob;
ob.options.set({iconColor: "#f15a22"});
ob.properties.set({active: true});
}
} else if( ob.properties.get("ob_type") == "LineString" ){
ob.options.set({strokeColor: "#EAA6A5"});
ob.properties.set({active: false});
if( ob.properties.get("description") == ptid ){
om_line = ob;
ob.options.set({strokeColor: "#f15a22"});
ob.properties.set({active: true});
}
}
});
var new_mark = new ymaps.Placemark( coord,
{
iconCaption: icon_caption,
iconContent: icon_content,
ob_type: "Point",
active: true
}, {
iconColor: color_default,
preset: 'islands#redDotIcon'
});
new_mark.events.add("click", function(e){
var ptid = parseInt( e.get('target').properties.get("iconContent") );
Show_Addr( ptid );
});
new_mark.events.add("mouseenter", function(e){
if( e.get('target').properties.get("active") === false ){
e.get('target').options.set({iconColor: color_mouseenter});
}
});
var new_line = new ymaps.GeoObject({
geometry: {
type: "LineString",
coordinates: coords,
description: descr,
},
properties:{
// hintContent: "",
description: descr,
ob_type: "LineString",
active: true
}},
{
//draggable: true,
strokeColor: "#ed4543",
strokeWidth: 6
});
new_line.events.add("click", function(e){
var ptid = parseInt( e.get('target').properties.get("description") );
Show_Addr( ptid );
});
&where=`{ "image:contains" : "_thumb" }`
contains
не видел, просто уже методом тыка вставил оператор pdoTools, на который когда-то натыкался.containsnot
из этой же справки не работает. var gulp = require("gulp");
var concat = require("gulp-concat");
var sass = require("gulp-sass");
var postcss = require("postcss");
var autoprefixer = require("gulp-autoprefixer");
var cssnano = require("gulp-cssnano");
var livereload = require('gulp-livereload');
var autoprefixer_options = {
"browserslist": [
'> 1%',
'last 2 versions',
'firefox >= 4',
'safari 7',
'safari 8',
'IE 8',
'IE 9',
'IE 10',
'IE 11'
],
cascade: false
};
gulp.task('sass', function(){
return gulp.src( "ams_www_modx/assets/ams_modx/scss/style.scss" )
.pipe( sass().on("error", sass.logError) )
//.pipe( concat("style.css") )
.pipe( autoprefixer({ overrideBrowserslist: ['last 6 versions'] }) )
//.pipe( cssnano() )
.pipe( gulp.dest("ams_www_modx/assets/ams_modx/css") )
.pipe( livereload({host: "127.0.0.1", port: "35729"}) );
});
gulp.task('reload', function(){
return gulp.src( "ams_www_modx/assets/ams_modx/**/*.{html,php}" )
.pipe(livereload({host: "127.0.0.1", port: "35729"}));
log("///////////////////");
});
gulp.task('default', function(){
livereload.listen({host: "127.0.0.1", port: "35729"});
gulp.watch( ["ams_www_modx/assets/**/*.scss", "!ams_www_modx/assets/img/**/*"], gulp.series('sass') );
gulp.watch( ["ams_www_modx/assets/**/*.{html,php}", "!ams_www_modx/assets/img/**/*"], gulp.series('reload') );
});