@@ -25,25 +25,25 @@ var PackageService = (function () {
2525 project : { } ,
2626 chapters : [ ]
2727 } ;
28- this . config = { } ;
28+ this . packageJson = null ;
2929 }
3030 PackageService . prototype . selectPackage = function ( packageName ) {
3131 var packagePath = path_1 . join ( window . coderoad . dir , 'node_modules' , packageName ) ;
32- this . config = require ( path_1 . join ( packagePath , 'package.json' ) ) ;
33- store_1 . store . dispatch ( actions_1 . setGlobals ( this . config ) ) ;
34- this . data = require ( path_1 . join ( packagePath , this . config . main ) ) ;
32+ this . packageJson = require ( path_1 . join ( packagePath , 'package.json' ) ) ;
33+ store_1 . store . dispatch ( actions_1 . setGlobals ( this . packageJson ) ) ;
34+ this . data = require ( path_1 . join ( packagePath , this . packageJson . main ) ) ;
3535 this . packageName = packageName ;
3636 } ;
3737 PackageService . prototype . page = function ( _a ) {
3838 var chapter = _a . chapter , page = _a . page ;
3939 return cloneDeep ( this . data . chapters [ chapter ] . pages [ page ] ) ;
4040 } ;
41- PackageService . prototype . getConfig = function ( ) {
42- return this . config ;
41+ PackageService . prototype . getPackage = function ( ) {
42+ return this . packageJson ;
4343 } ;
4444 PackageService . prototype . configTaskTests = function ( tasks ) {
4545 var _this = this ;
46- var config = this . config . config ;
46+ var config = this . packageJson . config ;
4747 return ! tasks ? [ ] : tasks . map ( function ( task ) {
4848 if ( task . tests ) {
4949 task . tests = task . tests . map ( function ( test ) {
0 commit comments