grunt-bower-task and Polymer

匆匆过客 提交于 2019-12-04 10:59:50

hate to provide a sample of a fail....

FWIW recently , i had very similar issue ... worked it and failed

what i did is abandon the attempt to flatten everything out in the "dist" tag for a first polymer project. Rather i just ran minify/ugly on one or two elements leaving the HTTP2 type file structure ( deep and many many, dirs/files. )

// the process belo NG . Manual edit needed on "polymer-min.html" go end and chg the js file name   
    copy: {
      main: {
        files: [
          // includes files within path
          {expand: true, src: ['*html'], dest: 'dest/', filter: 'isFile'},
          // includes files within path and its sub-directories
          {expand: true, src: ['js/**', 'images/**' ,'css/**' ,'elements/**' ,'bower_components/**'], dest: 'dest/'},
        { src: ['tmp/csp/build-csp.html'], dest: 'dest/bower_components/cast-button-polymer/cast-button-polymer-min.html', 
            filter: 'isFile',
            options: {
              process: function (content, srcpath) {
                return content.replace(/build-csp.js/g,"cast-button-polymer-min.js");
              },
            },
            },
        { src: ['tmp/csp/build-csp-min.js'], dest: 'dest/bower_components/cast-button-polymer/cast-button-polymer-min.js', filter: 'isFile'},         
        ],
      },
},
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!