Release wrt_support and wrt/static to out directory 39/149139/2
authorYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 11 Sep 2017 08:43:07 +0000 (17:43 +0900)
committerSungsik Han <ss440.han@samsung.com>
Tue, 12 Sep 2017 04:55:05 +0000 (04:55 +0000)
The wrt_support or wrt/static have been located in source tree.
Build result needs to be released to out folder to remove
dependency of source tree in runtime.

Change-Id: Idc92a27c47c18063d5556d1afe6bb62c6a154407
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
wrt/build/tasks/build-task.coffee
wrt/build/tasks/generate-asar-task.coffee

index 5c902be..497917f 100644 (file)
@@ -13,7 +13,7 @@ module.exports = (grunt) ->
     babelCompiledDir = grunt.config.get('was.babelCompiledDir')
     babelCompiledSrcDir = path.join(babelCompiledDir, 'wrt', 'src')
     wrtSrcDir = path.join(wrtDir, 'src')
-    wrt_node_modules = path.resolve('node_modules')
+    wrt_node_modules = '../node_modules'
 
     console.log "shellAppDir #{shellAppDir}"
     console.log "buildDir #{buildDir}"
@@ -185,7 +185,11 @@ module.exports = (grunt) ->
     cp wrtSrcDir, path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/
     if grunt.file.exists babelCompiledSrcDir
       cp babelCompiledSrcDir, path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/
-    # cp 'static', path.join(appDir, 'static')
+    console.log('wrtDir   : ' + wrtDir)
+    console.log('buildDir : ' + buildDir)
+    cp path.join(wrtDir, 'static'), path.join(appDir, 'static')
+    cp path.join(wrtDir, 'wrt_support'), path.join(buildDir, 'resources/wrt_support')
+    cp path.join(wrtDir, 'node_modules'), path.join(appDir, 'node_modules')
 
     # cp path.join('apm', 'node_modules', 'atom-package-manager'), path.resolve(appDir, '..', 'new-app', 'apm'), filter: filterNodeModule
     # if process.platform isnt 'win32'
index b6510e9..000d097 100644 (file)
@@ -21,7 +21,7 @@ module.exports = (grunt) ->
 
     appDir = grunt.config.get('was.appDir')
 
-    console.log(appDir)
+    console.log('appDir : ' + appDir)
     unless fs.existsSync(appDir)
       grunt.log.error 'The app has to be built before generating asar archive.'
       return done(false)