os = require 'os'
glob = require 'glob'
usesBabel = require './lib/uses-babel'
-electronBinaryPath = path.resolve(__dirname, '../','electron_binary', 'electron-v0.31.0-linux-x64');
+electronBinaryPath = path.resolve(__dirname, '../../','electron_binary', 'electron-v0.31.0-linux-x64');
process.env.ELECTRON_PATH = electronBinaryPath;
# # Add support for obselete APIs of vm module so we can make some third-party
# # modules work under node v0.11.x.
grunt.loadNpmTasks('grunt-mocha-cli')
# This allows all subsequent paths to the relative to the root of the repo
- grunt.file.setBase(path.resolve('..'))
+ grunt.file.setBase(path.resolve('../..'))
if not grunt.option('verbose')
grunt.log.writeln = (args...) -> grunt.log
runtimeName = 'wrt'
wrtDir = path.join(path.resolve(), runtimeName)
babelCompiledDir = path.join(path.resolve(), 'babel_compiled')
- asarPacagePath = path.join(path.resolve(), 'out','R','resources','app.asar')
+ asarPacagePath = path.join(path.resolve(), 'out','D','resources','app.asar')
appName = if process.platform is 'darwin' then 'was.app' else 'was'
- buildDir = path.join( path.resolve(), 'out', 'R' )
+ buildDir = path.join( path.resolve(), 'out', 'D' )
buildDir = path.resolve(buildDir)
installDir = grunt.option('install-dir')
glob_to_multiple:
expand: true
src: [
- '**/*.coffee'
+ 'wrt/**/*.coffee'
]
dest: path.resolve()
ext: '.js'
presets: ['es2015']
dist:
files: []
- for jsFile in glob.sync('src/**/*.js')
+ for jsFile in glob.sync('wrt/src/**/*.js')
if usesBabel(jsFile)
console.log 'use babel : #{jsFile}'
babelConfig.dist.files.push({
})
eslintConfig =
options:
- configFile: 'build/.eslintrc'
- target: ['src/**/*.js','build/test/**/*.js']
+ configFile: 'wrt/build/.eslintrc'
+ target: ['wrt/src/**/*.js','wrt/build/test/**/*.js']
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
options:
configFile: 'coffeelint.json'
src: [
- '**/*.coffee'
+ 'wrt/**/*.coffee'
]
build: [
- 'build/tasks/**/*.coffee'
- 'build/Gruntfile.coffee'
+ 'wrt/build/tasks/**/*.coffee'
+ 'wrt/build/Gruntfile.coffee'
]
eslint: eslintConfig
# test: [
- # 'spec/*.coffee'
+ # 'wrt/spec/*.coffee'
# ]
# standard:
# src: [
- # 'src/**/*.js'
- # 'static/*.js'
+ # 'wrt/src/**/*.js'
+ # 'wrt/static/*.js'
# ]
mochacli:
options:
reporter: 'spec'
- installer: ['build/test/installer/*.js']
+ installer: ['wrt/build/test/installer/*.js']
# all: ['build/test/**/*.js', 'build/test/**/**/*.js', 'build/test/**/**/**/**/*.js']
# appDirectory: shellAppDir
# outputDirectory: path.join(buildDir, 'installer')
# authors: 'GitHub Inc.'
- # loadingGif: path.resolve(__dirname, '..', 'resources', 'win', 'loading.gif')
+ # loadingGif: path.resolve(__dirname, '../..', 'resources', 'win', 'loading.gif')
# iconUrl: 'https://raw.githubusercontent.com/atom/atom/master/resources/win/atom.ico'
- # setupIcon: path.resolve(__dirname, '..', 'resources', 'win', 'atom.ico')
+ # setupIcon: path.resolve(__dirname, '../..', 'resources', 'win', 'atom.ico')
# remoteReleases: 'https://atom.io/api/updates'
# shell:
babelCompiledDir = grunt.config.get('was.babelCompiledDir')
babelCompiledSrcDir = path.join(babelCompiledDir, 'wrt', 'src')
wrtSrcDir = path.join(wrtDir, 'src')
- wrt_node_modules = 'node_modules'
+ wrt_node_modules = path.resolve('node_modules')
console.log "shellAppDir #{shellAppDir}"
console.log "buildDir #{buildDir}"
#it had maded when electron build
# mkdir path.dirname(buildDir)
- #we use default electron build path "out/R"
+ #we use default electron build path "out/D"
# if process.platform is 'darwin'
# cp 'atom-shell/Atom.app', shellAppDir, filter: /default_app/
# else
grunt = require 'grunt'
spawn = grunt.util.spawn
-#electronBinaryPath = path.resolve(__dirname, '../../','electron_binary', 'electron-v0.31.0-linux-x64','electron');
-electronBinaryPath = path.resolve(__dirname, '../../','out', 'R','electron');
-electronMocah = path.resolve(__dirname, '../','node_modules','electron-mocha', 'bin','electron-mocha');
-mainProcesstestFile = path.resolve(__dirname, '../','test','runtime', 'js','main-process','*.js');
-rendererProcesstestFile = path.resolve(__dirname, '../','test','runtime', 'js','renderer-process','*.js');
-wasHome = path.resolve(__dirname,'../../');
-installerPath = path.resolve(__dirname,'../../','installer');
-wasAppsRepo = path.resolve(__dirname,'../../','apps_repo');
+#electronBinaryPath = path.resolve(__dirname, '../../../','electron_binary', 'electron-v0.31.0-linux-x64','electron');
+electronBinaryPath = path.resolve(__dirname, '../../../../','out', 'D','electron');
+electronMocah = path.resolve(__dirname, '../../','node_modules','electron-mocha', 'bin','electron-mocha');
+mainProcesstestFile = path.resolve(__dirname, '../../','test','runtime', 'js','main-process','*.js');
+rendererProcesstestFile = path.resolve(__dirname, '../../','test','runtime', 'js','renderer-process','*.js');
+wasHome = path.resolve(__dirname,'../../../');
+installerPath = path.resolve(__dirname,'../../../','installer');
+wasAppsRepo = path.resolve(__dirname,'../../../','apps_repo');
process.env.DEBUG = 'WEBAPPLICATION,RUNTIME,TRY';
process.env.ELECTRON_PATH = electronBinaryPath;
done code == 0
child.stdout.pipe(process.stdout);
child.stderr.pipe(process.stderr);
- )
\ No newline at end of file
+ )