mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
Now update the modules
This commit is contained in:
@ -63,6 +63,12 @@ module.exports = {
|
||||
localCfg.appDir + "/*",
|
||||
"!" + pathModule.join(localCfg.appDir, "App_Resources") + ""
|
||||
]
|
||||
},
|
||||
modules: {
|
||||
src: pathModule.join(localCfg.applicationDir, "node_modules", "tns-core-modules")
|
||||
},
|
||||
tempExtractedModules: {
|
||||
src: pathModule.join(localCfg.applicationDir, "node_modules", "package")
|
||||
}
|
||||
},
|
||||
mkdir: {
|
||||
@ -80,6 +86,12 @@ module.exports = {
|
||||
cwd: localCfg.pathToCompiledTests,
|
||||
expand: true
|
||||
},
|
||||
modulesToDir: {
|
||||
expand: true,
|
||||
src: "**/*.*",
|
||||
cwd: pathModule.join(localCfg.applicationDir, "node_modules", "package"),
|
||||
dest: pathModule.join(localCfg.applicationDir, "node_modules", "tns-core-modules")
|
||||
},
|
||||
addAndroidPermissions: {
|
||||
src: "AndroidManifest.xml",
|
||||
dest: localCfg.applicationDir + "/platforms/android/src/main/",
|
||||
@ -137,6 +149,12 @@ module.exports = {
|
||||
cmd: "adb shell am start -n " + localCfg.deployedAppName + "/" + localCfg.mainActivityName
|
||||
}
|
||||
},
|
||||
untar: {
|
||||
modules: {
|
||||
src: localCfg.modulesPath,
|
||||
dest: pathModule.join(localCfg.applicationDir, "node_modules")
|
||||
}
|
||||
},
|
||||
shell: {
|
||||
collectAndroidLog: {
|
||||
command: "./expect.exp " + localCfg.outfile,
|
||||
@ -154,6 +172,7 @@ module.exports = {
|
||||
grunt.loadNpmTasks("grunt-mkdir");
|
||||
grunt.loadNpmTasks("grunt-contrib-clean");
|
||||
grunt.loadNpmTasks("grunt-contrib-copy");
|
||||
grunt.loadNpmTasks("grunt-untar");
|
||||
|
||||
var getPlatformSpecificTask = function(templatedTaskName) {
|
||||
return templatedTaskName.replace(/\{platform\}/, localCfg.platform);
|
||||
@ -172,8 +191,10 @@ module.exports = {
|
||||
"exec:createApp",
|
||||
"clean:originalAppDir",
|
||||
"copy:testsAppToRunDir",
|
||||
"clean:modules",
|
||||
"untar:modules",
|
||||
"copy:updateModules",
|
||||
"copy:modulesToDir",
|
||||
"clean:tempExtractedModules",
|
||||
|
||||
getPlatformSpecificTask("exec:add{platform}Platform"),
|
||||
getPlatformSpecificTask("copy:add{platform}Permissions"),
|
||||
|
@ -25,6 +25,7 @@
|
||||
"grunt-simple-mocha": "0.4.0",
|
||||
"grunt-ts": "5.0.0-beta.5",
|
||||
"grunt-tslint": "2.5.0",
|
||||
"grunt-untar": "0.0.1",
|
||||
"mocha": "2.2.5",
|
||||
"typescript": "1.6.2"
|
||||
}
|
||||
|
Reference in New Issue
Block a user