@@ -63,6 +63,12 @@ module.exports = {
6363 localCfg . appDir + "/*" ,
6464 "!" + pathModule . join ( localCfg . appDir , "App_Resources" ) + ""
6565 ]
66+ } ,
67+ modules : {
68+ src : pathModule . join ( localCfg . applicationDir , "node_modules" , "tns-core-modules" )
69+ } ,
70+ tempExtractedModules : {
71+ src : pathModule . join ( localCfg . applicationDir , "node_modules" , "package" )
6672 }
6773 } ,
6874 mkdir : {
@@ -80,6 +86,12 @@ module.exports = {
8086 cwd : localCfg . pathToCompiledTests ,
8187 expand : true
8288 } ,
89+ modulesToDir : {
90+ expand : true ,
91+ src : "**/*.*" ,
92+ cwd : pathModule . join ( localCfg . applicationDir , "node_modules" , "package" ) ,
93+ dest : pathModule . join ( localCfg . applicationDir , "node_modules" , "tns-core-modules" )
94+ } ,
8395 addAndroidPermissions : {
8496 src : "AndroidManifest.xml" ,
8597 dest : localCfg . applicationDir + "/platforms/android/src/main/" ,
@@ -137,6 +149,12 @@ module.exports = {
137149 cmd : "adb shell am start -n " + localCfg . deployedAppName + "/" + localCfg . mainActivityName
138150 }
139151 } ,
152+ untar : {
153+ modules : {
154+ src : localCfg . modulesPath ,
155+ dest : pathModule . join ( localCfg . applicationDir , "node_modules" )
156+ }
157+ } ,
140158 shell : {
141159 collectAndroidLog : {
142160 command : "./expect.exp " + localCfg . outfile ,
@@ -154,6 +172,7 @@ module.exports = {
154172 grunt . loadNpmTasks ( "grunt-mkdir" ) ;
155173 grunt . loadNpmTasks ( "grunt-contrib-clean" ) ;
156174 grunt . loadNpmTasks ( "grunt-contrib-copy" ) ;
175+ grunt . loadNpmTasks ( "grunt-untar" ) ;
157176
158177 var getPlatformSpecificTask = function ( templatedTaskName ) {
159178 return templatedTaskName . replace ( / \{ p l a t f o r m \} / , localCfg . platform ) ;
@@ -172,8 +191,10 @@ module.exports = {
172191 "exec:createApp" ,
173192 "clean:originalAppDir" ,
174193 "copy:testsAppToRunDir" ,
194+ "clean:modules" ,
175195 "untar:modules" ,
176- "copy:updateModules" ,
196+ "copy:modulesToDir" ,
197+ "clean:tempExtractedModules" ,
177198
178199 getPlatformSpecificTask ( "exec:add{platform}Platform" ) ,
179200 getPlatformSpecificTask ( "copy:add{platform}Permissions" ) ,
0 commit comments