def js_prerelease(command, strict=False):
    'decorator for building minified js/css prior to another command'

    class DecoratedCommand(command):

        def run(self):
            jsdeps = self.distribution.get_command_obj('jsdeps')
            if ((not is_repo) and all((osp.exists(t) for t in jsdeps.targets))):
                command.run(self)
                return
            try:
                self.distribution.run_command('jsdeps')
            except Exception as e:
                missing = [t for t in jsdeps.targets if (not osp.exists(t))]
                if (strict or missing):
                    log.warn('js check failed')
                    if missing:
                        log.error(('missing files: %s' % missing))
                    raise e
                else:
                    log.warn('js check failed (not a problem)')
                    log.warn(str(e))
            command.run(self)
    return DecoratedCommand
decorator for building minified js/css prior to another command
def js_prerelease(command, strict=False):
    

    class DecoratedCommand(command):

        def run(self):
            jsdeps = self.distribution.get_command_obj('jsdeps')
            if ((not is_repo) and all((osp.exists(t) for t in jsdeps.targets))):
                command.run(self)
                return
            try:
                self.distribution.run_command('jsdeps')
            except Exception as e:
                missing = [t for t in jsdeps.targets if (not osp.exists(t))]
                if (strict or missing):
                    log.warn('js check failed')
                    if missing:
                        log.error(('missing files: %s' % missing))
                    raise e
                else:
                    log.warn('js check failed (not a problem)')
                    log.warn(str(e))
            command.run(self)
    return DecoratedCommand