Giter VIP home page Giter VIP logo

grunt-closure-tools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

grunt-closure-tools's Issues

New option in `compilerOpts` that allow direct control of the gcc command options.

Right now there is a lot of the gcc options which are not covered by this plugin. For example --module, --transform_amd_modules, --module_output_path_prefix options. Because there are so many of them I suggest that instead of adding the correspond option for each of them to add only one new option that will allow direct adding of the gcc options to the generating gcc command. Let's call this new option manualControl. Then example usage of it will be:

  ,delete: {
     TEMPcompilerOpts:{
       manualControl:'--module first:2 second:1:first --module_output_path_prefix="dist"'
     }
    ,src: ['plugins/ZoomButtons/*.js']
    ,dest: 'dist/canvas-interaction-zoom-buttons.min.js'
  }

Will generate the next cmd:

java -jar node_modules/superstartup-closure-compiler/build/compiler.jar --js plugins/ZoomButtons/ZoomButtons.js --js_output_file=dist/canvas-interaction-zoom-buttons.min.js --module first:2 second:1:first --module_output_path_prefix="dist"

What do you think about this option?

Building Overlapping Sources to two destination files

Hi there,

I wasn't sure where to post this question, so I hope I am in the right spot.

I used the closureplease/generator-closuer generator (which uses your closure builder tool) to create a project for my team to work on. For the project, my team is building a game engine that uses web workers to offload data. For the engine, we need to have some code that runs in both the web worker and the main window, while some is exclusive to each, and we need to synchronize the data running in both by serializing it to JSON.

I have a dev environment set up now where it runs the uncompiled code fine, but my question is what is the best way to set up the compilations?

Right now, I have two compilations, one for the main window and one for the web worker, but the issue with is that when i synchronize the data, each compilation has different names for the variables.

Is there someway, with the closure builder, to run a compilation that will take two entry points and produce two separate files? Here is my code, if you need to look at it: https://github.com/jadmz/CrunchJS.

Thanks

Joe

closureCompiler task silently fails.

I have this task:

`closureCompiler: {

        options: {

            // [REQUIRED] Path to closure compiler
            compilerFile: 'compiler.jar',
            //checkModified: true,

            compilerOpts: {
                compilation_level: 'ADVANCED_OPTIMIZATIONS',
                formatting:'PRETTY_PRINT',
                language_in: 'ECMASCRIPT5_STRICT',
                angular_pass: null,
                create_source_map: null,
                externs: ['externs/angular.js', 'externs/underscore.js'],
                //define: ["'goog.DEBUG=false'"],
                warning_level: 'verbose',
                jscomp_off: ['checkTypes', 'fileoverviewTags', 'missingProperties'],
                summary_detail_level: 3
                //output_wrapper: '"(function(){%output%}).call(this);"'
            },
            execOpts: {
                /**
                 * Set maxBuffer if you got message "Error: maxBuffer exceeded."
                 * Node default: 200*1024
                 */
                maxBuffer: 999999 * 1024
            },
            TieredCompilation: true // will use 'java -server -XX:+TieredCompilation -jar compiler.jar'
        },
        // any name that describes your task
        processJS: {
            src: '<%= compile_dir %>/assets/<%= pkg.name %>-<%= pkg.version %>-codebase-'+currTimeStamp+'.js',
            dest: '<%= compile_dir %>/assets/<%= pkg.name %>-<%= pkg.version %>-codebase-'+currTimeStamp+'.js'
        }
    }`

I have ironed out all the errors I was getting and now when I run the task it still fails, like this:

`Executing: java -server -XX:+TieredCompilation -jar "compiler.jar" --js compile/assets/xxx-7.0.0-codebase-1409837668761.js --js_output_file=compile/assets/xxx-7.0.0-codebase-1409837668761.js --compilation_level ADVANCED_OPTIMIZATIONS --formatting PRETTY_PRINT --language_in ECMASCRIPT5_STRICT --angular_pass --create_source_map --externs externs/angular.js --externs externs/underscore.js --warning_level verbose --jscomp_off checkTypes --jscomp_off fileoverviewTags --jscomp_off missingProperties --summary_detail_level 3

Error: Command failed: 0 error(s), 0 warning(s)
FAILED to run command for target: processJS
Warning: Task "closureCompiler:processJS" failed. Use --force to continue.`

If I force it, everything is ok, but that is not the solution here.

What could I be doing wrong? Or what is the module doing wrong? :D

Thanks!

Grunt 0.4 Release

I'm posting this issue to let you know that we will be publishing Grunt 0.4 on Monday, February 18th.

If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.

If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8" as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0" to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.

Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.

Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!

If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.

Thanks, we really appreciate your work!

Use TieredCompilation?

With Java 7, using TieredCompilation significantly reduces compilation time:

'java -server -XX:+TieredCompilation -jar ...'

I'm not a Java VM expert, and have only a vague idea what this does, but with my own compilations, adding this halves compilation time or better, particularly significant with complicated advanced_optimizations.

Watch Task

Hi Thanasis, Thanks for making closure tools. I have a couple of questions I hope you could help me with.

Firstly, I would like to set up a watch task thats watches my files and run "depsWriter" if any files are changed. I tried the following code but nothing happens:

closureDepsWriter: {
options: {
depswriter: 'closure-library/closure/bin/build/depswriter.py',
root_with_prefix: '"src ../../../"'
},
// any name that describes your operation
targetName: {
//src: 'src/*.js',
dest: 'deps.js'
}
},

watch: {
files: 'src/*.js',
tasks: ['closureDepsWriter']
}

My second question is: Do I need to specify any files in the 'targetName' part when I am using "root_with_prefix"? See about I have it commented out, what what I use this for.

My third question is that I get an error when trying to compile. If I change the output to compiled instead of 'script' it throws and error stating I need to specify the comiler jar but i have. If i comment out the 'output' and set 'compile'to true it works. What are the differece between these two?

Thanks,

Adam

Make file skipping optional

Based on my reading of lines 183-203 in closureCompiler.js, it looks like there is a check before compilation to see if any of the source files have been modified since the last output file was generated.

This check may erroneously skip minification if a file exists at the dest file location with a newer mtime than each source file, since the existence of a newer file there does not necessarily mean the file was the result of a closure compilation. I'm not sure of an elegant way to be sure that the dest file is actually one recently generated by closure compiler, so I suggest making that an optional feature that is disabled by default and documenting its behavior.

Load grunt tasks automatically

I get a problem if i use the load-grunt-task plugin.
Example:
require('load-grunt-tasks')(grunt); // also with pattern to exclude tasks
grunt.initConfig({
closureDepsWriter: {
...

to use the load-grunt-task pattern to exclude tasks didn't work

Error:
I get every time Warning: Maximum call stack size exceeded.
!!!Without the load-grunt-tasks it works perfect.
It would be nice if the grunt-closure-tools plugin works with the load-grunt-tasks plugin.

ClosureBuilder root option problem.

When i try this tools i get this problem (bug).
In my grunt config i got setup for watch coffee scripts. After compile coffee file grunt runs closureBuilder.
When closureBuilder runs for first time all is ok.
But when this task runs for second time root option is empty so i get OSError: [Errno 2] No such file or directory: ''
Thx for answer.

Closure Compiler fails with 'maxBuffer exceeded' when more than one file is processed

I'm using version 0.9.0 on a Windows x64 machine and I have the following config:

closureCompiler: {
  options: {
    compilerFile: 'utils/compiler.jar',
    compilerOpts: {
      compilation_level: 'SIMPLE_OPTIMIZATIONS',
      jscomp_off: ['checkTypes', 'fileoverviewTags'],
      summary_detail_level: 3,
      language_in: 'ECMASCRIPT5'
    },
    execOpts: {
      maxBuffer: 999999 * 1024
    }
  },
  chrome: {
    files: [
      {src: 'temp/chrome/background.js', dest: 'temp/compiled/chrome/background.js'},
      {src: 'temp/chrome/js/injection.js', dest: 'temp/compiled/chrome/js/injection.js'}
    ]
  }
}

The first file is processed correctly, but the second one fails with:

>>>Error: maxBuffer exceeded.
>>>Failed to run command for target: chrome

It doesn't matter what value I set maxBuffer to.

If I remove the first file from the config, the second file is processed correctly.
Basically it seems to fail as soon as more than one file is to be processed.

Grunt 0.4 compatibility

Not huge priority, but as the release of Grunt 0.4 appears imminent, it's probably a good idea to start making this plugin compatible with the new version, as it currently is not.

Create source maps for multiple files with expand

I have this part of config:

closureCompiler: {
    options: {
        compilerFile: 'system/utils/compiler.jar',
        checkModified: true
    },
    compilerOpts: {
        compilation_level: 'SIMPLE_OPTIMIZATIONS',
        warning_level: 'verbose',
        summary_detail_level: 3
    },
    minify: {
        files: [{
            expand: true,
            cwd: 'public/3/js/sources',
            src: '*.js',
            dest: 'public/3/js/min',
            ext: '.min.js'
        }]
    }
}

Can I create souce maps a similar way?
Now I have in public/3/js/sources:
profile.js
support.js
offer.js

Ant this files minified to public/3/js/min:
profile.min.js
support.min.js
offer.min.js

And I want to have in public/3/js/min too:
profile.min.js.map
support.min.js.map
offer.min.js.map

I don't understand how to do it. Can you help me?)

Allow specifying "create_source_map" for src-dest mapping in compiler task

I'm providing mapping of src-dest files to closureCompiler and it works great. Now I would need to extend the parameters to specify also source map file - ideally just inferred from dest name by adding .map extension.

Currently, I only can specify single value in 'compilerOpts.create_source_map', which would produce the same file for each output overwriting it in each iteration.

When the file mapping is specified as input (i.e. dest is specified) then if the option "create_source_map" is specified, it's value could be treated as file extension of the dest name. Or there should be some other mechanism how to specify the map file name per dest file.

New option in `compilerOpts` - `useGoogExport: true`

When I use google-closure I often use goog.exportSymbol and goog.exportProperty functions. I am quite tired to drag their sources from one project to another. So I want to propose a new option in compilerOpts - useGoogExport: true. When it is enabled you can use these export methods in your project without adding their sources. Compiler automatically will use their definitions when generating minified project sources.
If something like this already exists let me know because I couldn't find it in the docs. If not I will be glad to implement it.

compilerFile does not expand environment variables

Using npm (with global flag), the closure compiler is typically installed somewhere under user profile. However, using environment variable in path specification like this:

compilerFile: '%USERPROFILE%/AppData/Roaming/npm/node_modules/closurecompiler/compiler/compiler.jar'

either:
compilerFile: '~/AppData...'

does not work. The environment variable is not expanded.
(Using Win8, cmd + msysgit or powershell+msysgit)

Source Maps relative to grunt file.

Hi when tring to generate a souce map, all the source files are relative to the grunt file and not the location of the source map.

create_source_map : "<%= pkg.name %>.advanced.map",

output_wrapper: '(function(){%output%}).call(this);//@ sourceMappingURL=<%= pkg.name %>.advanced.map'

Is there a way to set the root path for the source map?

Thanks.

Different Compiler options for different builds

Hi, how can i create two closureBuilder task with different compiler options. I want one task to build in a 'debug' mode and another to build in an 'advanced' mode. Can I specify them in a different build like bellow:

closureBuilder:  {

      options: {
           compilerOpts: {}
      }, 


      debug_build : {
              // different compiler options to those specified above
       },


       release_build : {
               // different compiler options to those specified above
       }

}

Thanks.

Error when installing grunt-closure-tools on grunt-contrib-imagemin requirement.

C:\dsn\karoo\0.8\application>npm install grunt-closure-tools --save-dev
npm WARN package.json [email protected] No repository field.
npm http GET http://registry.npmjs.org/grunt-closure-tools
npm http 200 http://registry.npmjs.org/grunt-closure-tools
npm http GET http://registry.npmjs.org/task-closure-tools
npm http 200 http://registry.npmjs.org/task-closure-tools
npm ERR! peerinvalid The package grunt-contrib-imagemin does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants grunt-contrib-imagemin@~0.3.0

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "grunt-closure-tools" "--save
-dev"
npm ERR! cwd C:\dsn\karoo\0.8\application
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\dsn\karoo\0.8\application\npm-debug.log
npm ERR! not ok code 0

"create_source_map: null" trick only works if >1 mapping is specified.

If I only have 1 src->dest mapping specified, setting create_source_map: null in compilerOpts does not generate source mappings, since isMapping (in closureCompiler.js) is set to this.files.length > 1. For example,

closureCompiler: {
  options: {
    compilerFile: '/home/rwsims/tools/compiler.jar',
    compilerOpts: {
      create_source_map: null,
    }
  },
  compile: {
    files: {
      'foo.js': [ 'bar.js', 'baz.js' ]
    }
  }
}

will not generate source mappings; it passes an empty create_source_map flag to the compiler.

Having trouble compiling

Everything was working correctly untill I updated my java version. Now I get the following error:

>> Error: Command failed: ../closure/closure-library/bin/build/closurebuilder.py: Scanning paths...
>> ../closure/closure-library/bin/build/closurebuilder.py: 71 sources scanned.
>> ../closure/closure-library/bin/build/closurebuilder.py: Building dependency tree..
>> Traceback (most recent call last):
>>   File "../closure/closure-library/bin/build/closurebuilder.py", line 256, in <module>
>>     main()
>>   File "../closure/closure-library/bin/build/closurebuilder.py", line 241, in main
>>     options.compiler_flags)
>>   File "D:\_WORK\JOB_NAME\development\build\closure\closure-library\bin\build\jscompiler.py", line 50, in Compile
>>     if not (distutils.version.LooseVersion(_GetJavaVersion()) >=
>>   File "D:\_WORK\JOB_NAME\development\build\closure\closure-library\bin\build\jscompiler.py", line 34, in _GetJavaVersion
>>     return _VERSION_REGEX.search(version_line).group(1)
>> AttributeError: 'NoneType' object has no attribute 'group'
>> FAILED to run command for target: simple
Warning: Task "closureBuilder:simple" failed. Use --force to continue.

Aborted due to warnings.

The depswriter still works and if I manually run the compiler it works but not viar the "compiler tools" and grunt.

Thanks.

Add support for Node 8 (update grunt version).

Currently grunt-closure-tools relies on [email protected]

Unfortunately that is not compatible with Node 8 and will cause the following error:

npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

Seems like the fix is as easy as just updating package.json to point at a more recent version of grunt (which relies on graceful-fs).

Override compilerOpts in the target

Hi! It would be nice to have a possibility to override compilerOpts in the target. In my project I build several files. They all use different extern files. That is why this feature is important to me.

I've made a draft implementation for 'closureCompiler' task here vogdb/grunt-closure-tools@f30472d84cd670eae604c18d91ee094021febd40 If this implementation is OK I can do it for other tasks.

[Question] closureBuilder and multiple targets

The separation of closureBuilder options and targetName hints that the tool may be used for building multiple targets in a single task. If that is intended I don't understand why the required inputs/namespaces configuration is under options. Is it reasonable and possible to have multiple closureBuilder targets each with a distinct namespace? I'm new to grunt so I may just not be understanding how things should work. Thanks!

Empty src causes silent hang

In reusing build scripts I've come across the following problem.

  • No javascript files have been added to the src location (yet)
  • Run general build script that looks in that src location.
  • Build hangs silently and permanently.

To reproduce, just add a filter that is a bit too discriminating:

    closureCompiler: {
        site: {
            files: [{
                src: JS_GLOB_DFN,
                dest: MINIFIED_JS,
                filter: function(){return false;}
            }]
        }
    }

Ideally, if no files are selected, it would be great to see a warning that an empty file was being written to, and just write MINIFIED_JS as an effectively empty file without even hitting closure.

Empty src causes exit with error

@betaorbust reported on #67:

The initial issue (where once the glob was expanded, no files were left to be compiled) was fixed in task-closure-tools.
There's one related topic, for this repo, where no files are selected. The use case is where the files src list is externally sorted, and may come back empty.
Currently this throws a No commands produced for shell execution. Check your config file from closureCompiler.js L62 and quits in failure.
My proposal is to check this.files.length and then console warn that no files were selected and the task was skipped, but to not fatally terminate.

My personal issue was fixed with the previous tas-closure-tools PR, but figured I'd mention it here for completeness.

Thoughts, @thanpolas?

Include compiler.jar package info on README

Hi,
It would be nice if closure compiler jar file will be included into this plugin, so that the end-user won't have to download it manually, place it somewhere on a file system and configure path to it.
It will help to make projects more portable and easy to install on build servers.
Thanks

Unable to compiler files to the same ones

I have the following file structure:

js
 | - concat1.js
 | - concat2.js

I have the combined files for example concat1.js and concat2.js and I need to compile them by closureCompiler and put to the same files. I've tried 'files' grunt options:

 // any name that describes your task
 targetName: {
    files: [
     {
       expand: true,
       cwd: /'js',
       src: ['**/*.js'],
       dest: /'js'
      }
     ]
 }

but I get Error: Command failed error. How can I do this thing correctly?

Specifying builder source files in arguments

With closureBuilder, as well as (or instead of) specifying source directories in --root params, I can also specify individual source files as arguments. This ability seems to be missing in the Grunt task.

Output file appends undefined

Hello, this is my config:

closureCompiler: {
  dist: {
    closureCompiler: 'vendor/closure/compiler.jar',
    js: '<config:concat.dist.dest>',
    output_file: 'dist/test.min.js',
    checkModified: false,
    options: {
      compilation_level: 'ADVANCED_OPTIMIZATIONS',
    }
  }
},

but when it tries to compile I get

Running "closureCompiler:dist" (closureCompiler) task
Executing: java -jar vendor/closure/compiler.jar  --js dist/test-js.js --js_output_file=dist/test.min.jsundefined

as you can see it adds an 'undefined' string at the end of the file.. Any idea why?

Warning: Cannot call method 'indexOf' of undefined Use --force to continue.

module.exports = function (grunt) {
grunt.initConfig({

    closureBuilder: {
        options: {
            closureLibraryPath: 'web-app/s/js_src/outer',
            builder: 'web-app/s/js_src/outer/closure/bin/build/closurebuilder.py',

            root: ['web-app/s/js_src/outer','web-app/s/js_src/inner'],

            compilerFile: 'web-app/s/js_src/outer/closure/bin/compiler.jar',
            output_mode: 'compiled',
            compile: true,

            inputs: [
                'web-app/s/js_src/inner/'
            ],

            namespaces: ['ic.App'],

            compilerOpts: {
                warning_level: 'verbose',
                compilation_level: 'ADVANCED_OPTIMIZATIONS'
            }
        },

        application: {
            dest: 'web-app/s/js/application.js'
        },
    }
});

grunt.loadNpmTasks('grunt-closure-tools');
grunt.registerTask('compile', 'closureBuilder:application');

}

{
"name": "IntellicamsFrontEndBuild",
}

Support "--js closure-library/closure/goog/deps.js"

https://code.google.com/p/closure-library/wiki/FrequentlyAskedQuestions#When_I_compile_with_type-checking_on,_I_get_warnings_about_

When I compile with type-checking on, I get warnings about "Bad type annotation. Unknown type" from closure library files.

The raw compiler option would look something like:

--js closure-library/closure/goog/deps.js.

NOTE: If you're using closurebuilder.py (or calcdeps.py), it is not sufficient to simply specifiy "--root closure-library". You have to specifically add the deps file by passing a compiler option:

-f "--js closure-library/closure/goog/deps.js."

fails if source files not changed

If I use checkModified: true in the config, it fails grunt if source files are not changed. I think it should not like compass does.

FAILED to run command for target: development

 I have the following script:   


 closureBuilder:  {
        options: {
            // [REQUIRED] To find the builder executable we need either the path to
            //    closure library or directly the filepath to the builder:
            closureLibraryPath: 'closure-library', // path to closure library
            // [OPTIONAL] You can define an alternative path of the builder.
            //    If set it trumps 'closureLibraryPath' which will not be required.
           //builder: 'path/to/closurebuilder.py',

            // [REQUIRED] One of the two following options is required:
            //inputs: 'string|Array', // input files (can just be the entry point)
            inputs: 'server.js', // input files (can just be the entry point)
           //namespaces: 'string|Array', // namespaces

            // [OPTIONAL] The location of the compiler.jar
            // This is required if you set the option "compile" to true.
            compilerFile: 'compiler.jar',

            // [OPTIONAL] output_mode can be 'list', 'script' or 'compiled'.
            //    If compile is set to true, 'compiled' mode is enforced.
            //    Default is 'script'.
            output_mode: 'script',

            // [OPTIONAL] if we want builder to perform compile
            compile: false, // boolean

            compilerOpts: {
                /**
                 * Go wild here...
                 * any key will be used as an option for the compiler
                 * value can be a string or an array
                 * If no value is required use null
                 */
            },
            // [OPTIONAL] Set exec method options
            execOpts: {
                /**
                 * Set maxBuffer if you got message "Error: maxBuffer exceeded."
                 * Node default: 200*1024
                 */
                maxBuffer: 999999 * 1024
            }

        },

        // any name that describes your operation
        development: {

            // [REQUIRED] paths to be traversed to build the dependencies
            //              src: 'string|Array',

            // [OPTIONAL] if not set, will output to stdout
            //              dest: ''
            src: ['./', 'lib'],
           //src: '.',
            dest: 'dist/<%= pkg.name %>.js'
        }
    }

and I get the following error:

grunt closure --stack
Running "closureBuilder:development" (closureBuilder) task
Executing: python closure-library/closure/bin/build/closurebuilder.py -i server.js --root=./ --root=lib -o script --output_file=dist/nbmsgsrv.js

Error: Command failed: closure-library/closure/bin/build/closurebuilder.py: Scanning paths...
closure-library/closure/bin/build/closurebuilder.py: 4228 sources scanned.
closure-library/closure/bin/build/closurebuilder.py: Building dependency tree..
Traceback (most recent call last):
File "closure-library/closure/bin/build/closurebuilder.py", line 262, in
main()
File "closure-library/closure/bin/build/closurebuilder.py", line 211, in main
tree = depstree.DepsTree(sources)
File "/var/www/dev_panos/nb-ui/msgsrv/closure-library/closure/bin/build/depstree.py", line 48, in init
provide, [self._provides_map[provide], source])
depstree.MultipleProvideError: Namespace "Todos.models.Todo" provided more than once in sources:
Source node_modules/grunt-closure-tools/test/case/js/app/models/todo.js
Source node_modules/grunt-closure-tools/test/expected/build.bundled.js
FAILED to run command for target: development
Warning: Task "closureBuilder:development" failed. Use --force to continue.
Error: Task "closureBuilder:development" failed.
at Task. (/var/www/dev_panos/nb-ui/msgsrv/node_modules/grunt/lib/util/task.js:197:15)
at null._onTimeout (/var/www/dev_panos/nb-ui/msgsrv/node_modules/grunt/lib/util/task.js:225:33)
at Timer.listOnTimeout as ontimeout

Aborted due to warnings.

Can you help please?

Best,
Panos

Multiple dest files and error messages

Using ember.js you need to minify multiple js files but also get them out as separate js files for it to work. Would it be somehow possible to add an option to have as many output files as input files?
e.g.:

src: ['public/dist/scripts/components.js', 'public/dist/scripts/templates.js', 'public/dist/scripts/main.js'],
dest: ['public/dist/scripts/components.js', 'public/dist/scripts/templates.js', 'public/dist/scripts/main.js']

Also I noticed, that if I for example give it a wrong path for src or dest I don't get any error messages. It just blocks and I have to say it confused me for a while. So it would be really helpful if it could say something like: File does not exist.

Those two features would be really helpful. Especially the first one.
Thanks for this great work so with this package btw.

Closure Builder is deprecated

I'm getting this message now during the closureBuilder task:

.../closure-library/closure/bin/build/closurebuilder.py: Closure Compiler now natively understands and orders Closure dependencies and is prefererred over using this script for performing JavaScript compilation. 

Please migrate your codebase. 

See: https://code.google.com/p/closure-compiler/wiki/ManageClosureDependencies

I haven't looked at all the details, so I don't know how it affects this plugin, just wanted to let you know.

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.