Move more stuff into src/ for target-chromium.

This commit is contained in:
FelisCatus 2017-08-02 22:46:08 -04:00
parent 7a46271487
commit 9978279d00
25 changed files with 29 additions and 35 deletions

View File

@ -5,7 +5,7 @@ module.exports =
'index.js': 'index.coffee' 'index.js': 'index.coffee'
options: options:
transform: ['coffeeify'] transform: ['coffeeify']
exclude: ['bluebird', 'omega-pac'] exclude: ['bluebird', 'omega-pac', 'omega-target']
browserifyOptions: browserifyOptions:
extensions: '.coffee' extensions: '.coffee'
builtins: [] builtins: []
@ -30,7 +30,7 @@ module.exports =
omega_webext_proxy_script: omega_webext_proxy_script:
files: files:
'build/js/omega_webext_proxy_script.min.js': 'build/js/omega_webext_proxy_script.min.js':
'omega_webext_proxy_script.js' 'src/js/omega_webext_proxy_script.js'
options: options:
alias: alias:
'omega-pac': 'omega-pac/omega_pac.min.js' 'omega-pac': 'omega-pac/omega_pac.min.js'

View File

@ -1,13 +1,7 @@
module.exports = module.exports =
target_web: coffee:
files: expand: true
'build/js/omega_target_web.js': 'omega_target_web.coffee' cwd: 'src/coffee'
background: src: ['**/*.coffee']
files: dest: 'build/js/'
'build/js/background.js': 'background.coffee' ext: '.js'
background_preload:
files:
'build/js/background_preload.js': 'background_preload.coffee'
omega_debug:
files:
'build/js/omega_debug.js': 'omega_debug.coffee'

View File

@ -12,6 +12,8 @@ module.exports =
src: 'omega_target_chromium_extension.min.js' src: 'omega_target_chromium_extension.min.js'
dest: 'build/js/' dest: 'build/js/'
target_popup: target_popup:
expand: true
cwd: 'src/js'
src: 'omega_target_popup.js' src: 'omega_target_popup.js'
dest: 'build/js/' dest: 'build/js/'
overlay: overlay:

View File

@ -18,14 +18,11 @@ module.exports =
files: ['overlay/**/*'] files: ['overlay/**/*']
tasks: ['copy:overlay'] tasks: ['copy:overlay']
copy_target_popup: copy_target_popup:
files: ['omega_target_popup.js'] files: ['src/js/omega_target_popup.js']
tasks: ['copy:target_popup'] tasks: ['copy:target_popup']
src:
files: ['src/**/*.coffee']
tasks: ['coffeelint:src', 'browserify', 'copy:target_self']
browserify_omega_webext_proxy_script:
files: ['omega_webext_proxy_script.js']
tasks: ['browserify:omega_webext_proxy_script']
coffee: coffee:
files: ['src/**/*.coffee', '*.coffee'] files: ['src/**/*.coffee']
tasks: ['coffeelint:src', 'coffee', 'copy:target_self'] tasks: ['coffeelint:src', 'browserify', 'coffee', 'copy:target_self']
browserify_omega_webext_proxy_script:
files: ['src/js/omega_webext_proxy_script.js']
tasks: ['browserify:omega_webext_proxy_script']

View File

@ -1,12 +1 @@
module.exports = module.exports = require('./src/module')
Storage: require('./src/storage')
Options: require('./src/options')
ChromeTabs: require('./src/tabs')
SwitchySharp: require('./src/switchysharp')
ExternalApi: require('./src/external_api.coffee')
WebRequestMonitor: require('./src/web_request_monitor')
Inspect: require('./src/inspect')
Url: require('url')
for name, value of require('omega-target')
module.exports[name] ?= value

View File

@ -0,0 +1,12 @@
module.exports =
Storage: require('./storage')
Options: require('./options')
ChromeTabs: require('./tabs')
SwitchySharp: require('./switchysharp')
ExternalApi: require('./external_api')
WebRequestMonitor: require('./web_request_monitor')
Inspect: require('./inspect')
Url: require('url')
for name, value of require('omega-target')
module.exports[name] ?= value