# Path: grace/error.py
# class WrongFormatError(Error):
#     pass
# 
# class MissingKeyError(Error):
#     pass
# 
# class FileNotFoundError(Error):
#     pass
# 
# class KeyNotAllowedError(Error):
#     pass
# 
# Path: grace/utils.py
# def update(d, u):
#     for k, v in u.items():
#         if isinstance(v, collections.Mapping):
#             r = update(d.get(k, {}), v)
#             d[k] = r
#         else:
#             d[k] = u[k]
#     return d
# 
# def load_json(string):
#     obj = {}
# 
#     try:
#         obj = json.loads(string)
#     except ValueError as e:
#         raise e
# 
#     if sys.version_info.major < 3:
#         return _json_decode(obj)
# 
#     # if sys.version_info.major < 3:
#     #     d = _json_decode(obj)
#     #     if 'dizmo_settings' in d:
#     #         print(isinstance(d['dizmo_settings']['display_name'], str))
#     #         print(isinstance(d['dizmo_settings']['display_name'], unicode))
#     #         print(type(d['dizmo_settings']['display_name']))
#     #     return d
# 
#     return obj
# 
# def isstring(string):
#     if isinstance(string, str):
#         return True
# 
#     if sys.version_info.major < 3:
#         if isinstance(string, newstr):
#             return True
#         if isinstance(string, basestring):
#             return True
# 
#     return False


from builtins import object
from .error import WrongFormatError, MissingKeyError, FileNotFoundError, KeyNotAllowedError
from .utils import update, load_json, isstring
import os
import re
            if not isinstance(self._config['minify_css'], bool):
                self._config['minify_css'] = False

        if 'linter' not in self._config:
            self._config['linter'] = 'jshint'
        else:
            if not isstring(self._config['linter']):
                raise WrongFormatError('The linter key has to be a string.')

            if self._config['linter'] != 'jslint':
                if self._config['linter'] != 'jshint':
                    raise WrongFormatError('The linter key has to be either "jslint", "jshint" or undfined (missing).')

        if 'lintoptions' not in self._config:
            self._config['lintoptions'] = {}
        else:
            if not isinstance(self._config['lintoptions'], dict):
                raise WrongFormatError('The lintoptions key has to be a dict (object).')

        if 'autolint' not in self._config:
            self._config['autolint'] = True
        else:
            if not isinstance(self._config['autolint'], bool):
                raise WrongFormatError('The autolint key has to be a boolean.')

        if 'js_name' not in self._config:
            self._config['js_name'] = 'application'
        else:
            if not isstring(self._config['js_name']):
                self._config['js_name'] = 'application'

# Path: grace/error.py
# class WrongFormatError(Error):
#     pass
# 
# class MissingKeyError(Error):
#     pass
# 
# class FileNotFoundError(Error):
#     pass
# 
# class KeyNotAllowedError(Error):
#     pass
# 
# Path: grace/utils.py
# def update(d, u):
#     for k, v in u.items():
#         if isinstance(v, collections.Mapping):
#             r = update(d.get(k, {}), v)
#             d[k] = r
#         else:
#             d[k] = u[k]
#     return d
# 
# def load_json(string):
#     obj = {}
# 
#     try:
#         obj = json.loads(string)
#     except ValueError as e:
#         raise e
# 
#     if sys.version_info.major < 3:
#         return _json_decode(obj)
# 
#     # if sys.version_info.major < 3:
#     #     d = _json_decode(obj)
#     #     if 'dizmo_settings' in d:
#     #         print(isinstance(d['dizmo_settings']['display_name'], str))
#     #         print(isinstance(d['dizmo_settings']['display_name'], unicode))
#     #         print(type(d['dizmo_settings']['display_name']))
#     #     return d
# 
#     return obj
# 
# def isstring(string):
#     if isinstance(string, str):
#         return True
# 
#     if sys.version_info.major < 3:
#         if isinstance(string, newstr):
#             return True
#         if isinstance(string, basestring):
#             return True
# 
#     return False


# Path: grace/config.py
from builtins import object
from .error import WrongFormatError, MissingKeyError, FileNotFoundError, KeyNotAllowedError
from .utils import update, load_json, isstring
import os
import re

            if not isinstance(self._config['minify_css'], bool):
                self._config['minify_css'] = False

        if 'linter' not in self._config:
            self._config['linter'] = 'jshint'
        else:
            if not isstring(self._config['linter']):
                raise WrongFormatError('The linter key has to be a string.')

            if self._config['linter'] != 'jslint':
                if self._config['linter'] != 'jshint':
                    raise WrongFormatError('The linter key has to be either "jslint", "jshint" or undfined (missing).')

        if 'lintoptions' not in self._config:
            self._config['lintoptions'] = {}
        else:
            if not isinstance(self._config['lintoptions'], dict):
                raise WrongFormatError('The lintoptions key has to be a dict (object).')

        if 'autolint' not in self._config:
            self._config['autolint'] = True
        else:
            if not isinstance(self._config['autolint'], bool):
                raise WrongFormatError('The autolint key has to be a boolean.')

        if 'js_name' not in self._config:
            self._config['js_name'] = 'application'
        else:
            if not isstring(self._config['js_name']):
                self._config['js_name'] = 'application'

            else: