Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better cross platform dev #109

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
lib
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src
test
Cakefile
CONTRIBUTING.md
appveyor.yml
.*
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,3 @@ language: node_js
node_js:
- "0.10"
- "0.11"
before_install:
- npm install coffee-script
script:
- cake build
- cake test
47 changes: 17 additions & 30 deletions Cakefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
{print} = require 'util'
{spawn} = require 'child_process'
spawn = require 'win-spawn'

build = () ->
os = require 'os'
if os.platform() == 'win32'
coffeeCmd = 'coffee.cmd'
else
coffeeCmd = 'coffee'
coffee = spawn coffeeCmd, ['-c', '-o', 'lib/shadowsocks', 'src']
coffee.stderr.on 'data', (data) ->
process.stderr.write data.toString()
coffee.stdout.on 'data', (data) ->
print data.toString()
coffee.on 'exit', (code) ->
if code != 0
process.exit code
build = ->
coffee = spawn(
'coffee'
['-c', '-o', 'lib/shadowsocks', 'src']
{ stdio: 'inherit' }
)
coffee.on 'exit', process.exit

test = () ->
os = require 'os'
coffee = spawn 'node', ['lib/shadowsocks/test.js']
coffee.stderr.on 'data', (data) ->
process.stderr.write data.toString()
coffee.stdout.on 'data', (data) ->
print data.toString()
coffee.on 'exit', (code) ->
if code != 0
process.exit code
test = ->
coffee = spawn(
'node'
['lib/shadowsocks/test.js']
{ stdio: 'inherit' }
)
coffee.on 'exit', process.exit

task 'build', 'Build ./ from src/', ->
build()
task 'build', 'Build ./ from src/', build

task 'test', 'Run unit test', ->
test()
task 'test', 'Run unit test', test

14 changes: 14 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
build: false

environment:
matrix:
- nodejs_version: "0.10"
- nodejs_version: "0.11"

install:
- npm install

test_script:
- node --version
- npm --version
- npm test
252 changes: 0 additions & 252 deletions lib/shadowsocks/encrypt.js

This file was deleted.

Loading