mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -04:00
Start a webextension
This commit is contained in:
parent
5aca6028f9
commit
49dedf3a2f
11 changed files with 53 additions and 4 deletions
|
@ -21,14 +21,14 @@ FILES_SPEC = [
|
|||
'spec/websocket.spec.coffee'
|
||||
]
|
||||
FILES_ALL = FILES.concat FILES_SPEC
|
||||
OUTFILE = 'build/snowflake.js'
|
||||
OUTFILE = 'snowflake.js'
|
||||
STATIC = 'static'
|
||||
|
||||
copyStaticFiles = ->
|
||||
exec 'cp ' + STATIC + '/* build/'
|
||||
|
||||
compileCoffee = ->
|
||||
exec 'cat ' + FILES.join(' ') + ' | coffee -cs > ' + OUTFILE, (err, stdout, stderr) ->
|
||||
compileCoffee = (outDir) ->
|
||||
exec 'cat ' + FILES.join(' ') + ' | coffee -cs > ' + outDir + '/' + OUTFILE, (err, stdout, stderr) ->
|
||||
throw err if err
|
||||
|
||||
task 'test', 'snowflake unit tests', ->
|
||||
|
@ -48,9 +48,13 @@ task 'test', 'snowflake unit tests', ->
|
|||
task 'build', 'build the snowflake proxy', ->
|
||||
exec 'mkdir -p build'
|
||||
copyStaticFiles()
|
||||
compileCoffee()
|
||||
compileCoffee('build')
|
||||
console.log 'Snowflake prepared.'
|
||||
|
||||
task 'webext', 'build the webextension', ->
|
||||
compileCoffee('webext')
|
||||
console.log 'Webextension prepared.'
|
||||
|
||||
task 'lint', 'ensure idiomatic coffeescript', ->
|
||||
proc = spawn 'coffeelint', FILES_ALL, {
|
||||
file: 'coffeelint.json'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue