Skip to content

Commit 0445173

Browse files
committed
Now update the modules
1 parent 6ad3474 commit 0445173

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

build/run-testsapp.grunt.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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(/\{platform\}/, 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"),

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"grunt-simple-mocha": "0.4.0",
2626
"grunt-ts": "5.0.0-beta.5",
2727
"grunt-tslint": "2.5.0",
28+
"grunt-untar": "0.0.1",
2829
"mocha": "2.2.5",
2930
"typescript": "1.6.2"
3031
}

0 commit comments

Comments
 (0)