Grunt uglify not finding files

后端 未结 2 1671
醉梦人生
醉梦人生 2021-01-20 21:01

I have the following directory structure:

--development 
  -js
    -pages

--js
  -pages

I\'m trying to take all files in development/js/pa

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-20 21:37

    I wanted to answer with another option.

    Here is how I write my Uglify Grunt task incase you want to keep your options. It's setup to read as (dest : src), I also concat all my library files in task prior to Uglify.

    -

    uglify: {
            options: {
                // the banner is inserted at the top of the output
                banner: '/* \n Site: <%= pkg.name %> \n Version: <%= pkg.version %> \n Build Date: <%= grunt.template.today("mm-dd-yyyy") %> \n */\n \n'
            },
            site: {
                files: {
                    './_build/js/lib/lib.min.js': ['<%= concat.site.dest %>'],
                    './_build/js/app/app.min.js': ['./_build/js/app/app.js']
                }
            }
        },
    

提交回复
热议问题