Giter VIP home page Giter VIP logo

Comments (2)

alamehor avatar alamehor commented on July 29, 2024

yes this is question - I cant setup this is only compiler - just looping is needed

from grunt-closure-compiler.

sebastianKline avatar sebastianKline commented on July 29, 2024

@skotchio We recently configured this for our large project. We wanted to compile a .js file minify and put it back into the same path as the regular .js file. The following is how we achieved what you want:

'closure-compiler': {
    // minify JS files in-place 
    compileInPlace: {
        files: [
            {
	        expand: true,
		cwd: './',
		src: [
                    'js/edit.js',
                    // ....more files
                ],
		dest: './',
		rename: function (dest, src) {
		    // NOTE : this is done so we can support files "abc.def.js" and preserve the ".def" part.
		    return dest + '/' + src.replace('.js', '.min.js');
		}
	    }
	],
	options: {} // ... your options here
    },
}

Based on the configuration above, it will take js/edit.js and closure compile it into a file called js/edit.min.js. Hope this helps you out!

from grunt-closure-compiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.