<legend id='tnrkb'><style id='tnrkb'><dir id='tnrkb'><q id='tnrkb'></q></dir></style></legend>
    <i id='tnrkb'><tr id='tnrkb'><dt id='tnrkb'><q id='tnrkb'><span id='tnrkb'><b id='tnrkb'><form id='tnrkb'><ins id='tnrkb'></ins><ul id='tnrkb'></ul><sub id='tnrkb'></sub></form><legend id='tnrkb'></legend><bdo id='tnrkb'><pre id='tnrkb'><center id='tnrkb'></center></pre></bdo></b><th id='tnrkb'></th></span></q></dt></tr></i><div id='tnrkb'><tfoot id='tnrkb'></tfoot><dl id='tnrkb'><fieldset id='tnrkb'></fieldset></dl></div>
  1. <tfoot id='tnrkb'></tfoot>

      <small id='tnrkb'></small><noframes id='tnrkb'>

        <bdo id='tnrkb'></bdo><ul id='tnrkb'></ul>

      Gulp 不创建文件夹?

      时间:2023-05-29

        <i id='iZCTP'><tr id='iZCTP'><dt id='iZCTP'><q id='iZCTP'><span id='iZCTP'><b id='iZCTP'><form id='iZCTP'><ins id='iZCTP'></ins><ul id='iZCTP'></ul><sub id='iZCTP'></sub></form><legend id='iZCTP'></legend><bdo id='iZCTP'><pre id='iZCTP'><center id='iZCTP'></center></pre></bdo></b><th id='iZCTP'></th></span></q></dt></tr></i><div id='iZCTP'><tfoot id='iZCTP'></tfoot><dl id='iZCTP'><fieldset id='iZCTP'></fieldset></dl></div>

        <small id='iZCTP'></small><noframes id='iZCTP'>

          <tfoot id='iZCTP'></tfoot>

        • <legend id='iZCTP'><style id='iZCTP'><dir id='iZCTP'><q id='iZCTP'></q></dir></style></legend>
            <tbody id='iZCTP'></tbody>
          • <bdo id='iZCTP'></bdo><ul id='iZCTP'></ul>

                本文介绍了Gulp 不创建文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                当我缩小我的 css 时,我得到了一个不正确的路径,可以从各种库中获取字体.所以,我创建了一个任务,将字体从我的 bower_components/ 文件夹移动到 dist/public/fonts:

                When I minified my css, I was left with an incorrect path to the fonts from various libraries. So, I created a task to move the fonts from my bower_components/ folder to dist/public/fonts:

                gulp.task('doit', function() {
                    gulp.src(["public/bower_components/bootstrap/dist/fonts/*", "public/bower_components/font-awesome/fonts/*"])
                        .pipe(gulp.dest("dist/public/fonts"));
                });
                

                基本上,这应该将我需要的任何字体放入通用字体文件夹中,我的缩小 css 现在应该能够访问该文件夹.

                Basically that should throw any fonts I need into a generic fonts folder, which my minified css should now be able to access.

                但是在我运行它之后,dist/public/fonts 不存在.为什么不呢?

                But after I run it, dist/public/fonts doesn't exist. Why not?

                推荐答案

                我不完全理解你在 src-ing (public/bower_components?),但我相信你会想要使用 gulp.src 的 base 选项.

                I don't fully understand the paths you're src-ing (public/bower_components?), but I believe you'll want to use the base option for gulp.src.

                因为这两个 glob 将具有不同的基础,我建议将其分成两个单独的任务,并构建第三个以将它们聚合成一个.否则你需要进入合并流或 addSrc 插件.

                Because these two globs will have different bases, I'd suggest breaking it into two separate tasks, and building a third to aggregate them into a single. Otherwise you'll need to get into merging streams or the addSrc plugin.

                gulp.task('copy:fonts:bootstrap', function () {
                    return gulp.src(
                        [
                            'public/bower_components/bootstrap/dist/fonts/**/*'
                        ],
                        {
                            base: 'public/bower_components/bootstrap/dist/fonts'
                        }
                    )
                        .pipe(gulp.dest('dist/public/fonts'));
                });
                
                gulp.task('copy:fonts:fontawesome', function () {
                    return gulp.src(
                        [
                            'public/bower_components/font-awesome/fonts/**/*'
                        ],
                        {
                            base: 'public/bower_components/font-awesome/fonts'
                        }
                    )
                        .pipe(gulp.dest('dist/public/fonts'));
                });
                
                gulp.task('copy:fonts', ['copy:fonts:bootstrap', 'copy:fonts:fontawesome']);
                

                这篇关于Gulp 不创建文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Gulp-sourcemaps 没有创建源映射文件? 下一篇:语义ui的`gulp build`给出错误'ENOENT:没有这样的文

                相关文章

                最新文章

                  <bdo id='tjpdf'></bdo><ul id='tjpdf'></ul>
              1. <small id='tjpdf'></small><noframes id='tjpdf'>

                1. <i id='tjpdf'><tr id='tjpdf'><dt id='tjpdf'><q id='tjpdf'><span id='tjpdf'><b id='tjpdf'><form id='tjpdf'><ins id='tjpdf'></ins><ul id='tjpdf'></ul><sub id='tjpdf'></sub></form><legend id='tjpdf'></legend><bdo id='tjpdf'><pre id='tjpdf'><center id='tjpdf'></center></pre></bdo></b><th id='tjpdf'></th></span></q></dt></tr></i><div id='tjpdf'><tfoot id='tjpdf'></tfoot><dl id='tjpdf'><fieldset id='tjpdf'></fieldset></dl></div>
                  <legend id='tjpdf'><style id='tjpdf'><dir id='tjpdf'><q id='tjpdf'></q></dir></style></legend>

                  1. <tfoot id='tjpdf'></tfoot>