#NEWLINE# def find_systemjs_location( ) : #NEWLINE# #INDENT# '\n    Figure out where `jspm_packages/system.js` will be put by JSPM.\n    ' #NEWLINE# location = os . path . abspath ( os . path . dirname ( locate_package_json ( ) ) ) #NEWLINE# conf = parse_package_json ( ) #NEWLINE# if ( 'jspm' in conf ) : #NEWLINE# #INDENT# conf = conf [ 'jspm' ] #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# conf = conf [ 'directories' ] #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# raise ImproperlyConfigured ( ( "`package.json` doesn't appear to be a valid json object. Location: %s" % location ) ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise ImproperlyConfigured ( ( 'The `directories` configuarion was not found in package.json. Please check your jspm install and/or configuarion. `package.json` location: %s' % location ) ) #NEWLINE# #UNINDENT# jspm_packages = ( conf [ 'packages' ] if ( 'packages' in conf ) else 'jspm_packages' ) #NEWLINE# base = ( conf [ 'baseURL' ] if ( 'baseURL' in conf ) else '.' ) #NEWLINE# return os . path . join ( location , base , jspm_packages , 'system.js' )