我创建了许多WordPress插件,每个插件都遵循相同的文件夹结构,并且都使用Gulp来处理其SASS / JS资产。
文件夹结构如下:
|-- .gulpfile.js
|-- lsmwp-one
|-- plugin.php
|-- assets
|-- src
|-- style.scss
|-- dist
|-- lsmwp-two
|-- plugin.php
|-- assets
|-- src
|-- style.scss
|-- dist
我想有一个Gulpfile来监视每个“ lsmwp- *”文件夹,运行所有相关任务并将其输出到plugin dist文件夹。
我的Gulpfile当前正在监视这些文件夹,但是我无法设置目标位置。任何帮助将不胜感激。
var pluginSrc = 'wp-content/plugins/lsmwp-*/assets/src/style.scss';
gulp.task('lsmwp-plugins', () => {
gulp.src( pluginSrc )
.pipe(sass())
.pipe(concat('style.min.css'))
.pipe(autoprefixer())
.pipe(cssmin())
.pipe(gulp.dest(); // Stuck here...
});
答案 0 :(得分:0)
您似乎有两个问题。一,为每个插件文件夹分别运行任务。二,相对于每个插件文件夹设置目标。
SET SERVEROUTPUT ON
DECLARE
j apex_json.t_values;
l_paths apex_t_varchar2;
writers clob;
json_object_result clob;
BEGIN
writers := '[
{
"id": null,
"hashCode": "7ef605fc8dba5425d6965fbd4c8fbe1f",
"description": "Machado de Assis",
"base64Img": "8eNZ28Dh5rZQIPhNEfwqoo1LCVx..."
},
{
"id": 151,
"hashCode": "a8f15eda80c50adb0e71943adc8015cf",
"description": "José Alencar",
"base64Img": "/XIQIHCol8eNZ28Dh5rZQIPhNEfwqoo1LCVx/9k=..."
}
]';
apex_json.parse(j, writers);
l_paths := apex_json.find_paths_like (
p_values => j,
p_return_path => '[%]',
p_subpath => '.hashCode',
p_value => '7ef605fc8dba5425d6965fbd4c8fbe1f'
);
dbms_output.put_line('Itens found: ' || l_paths.count);
if (l_paths.count = 1) then
dbms_output.put_line('id: ' || apex_json.get_varchar2(p_values => j, p_path => l_paths(1) || '.id'));
dbms_output.put_line('hashCode: ' || apex_json.get_varchar2(p_values => j, p_path => l_paths(1) || '.hashCode'));
dbms_output.put_line('description: ' || apex_json.get_varchar2(p_values => j, p_path => l_paths(1) || '.description'));
dbms_output.put_line('base64Img: ' || apex_json.get_varchar2(p_values => j, p_path => l_paths(1) || '.base64Img'));
-- Here I would like to nullify base64Img attribute value
json_object_result := 'here goes the object matched in the search with the base64Img attribute value null';
end if;
END;