Skip to content

Commit

Permalink
Adding nexe
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User authored and yasserf committed May 31, 2016
1 parent 3cd2630 commit 8c31f86
Show file tree
Hide file tree
Showing 6 changed files with 293 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .gitignore
@@ -1,3 +1,4 @@

# Logs
logs
*.log
Expand All @@ -16,6 +17,9 @@ coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# nexe
nexe

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

Expand All @@ -28,4 +32,4 @@ node_modules
.lock-wscript

# IDE configuration
.idea
.idea
43 changes: 38 additions & 5 deletions .travis.yml
@@ -1,8 +1,41 @@
language: node_js

env:
- CXX=g++-4.8

node_js:
- "stable"
- "6.0"
- "5.0"
- "4.0"
script: npm run coverage
after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
- "6"
- "5"
- "4"
- "4.4.4" # Stated specifically for packaging
- "4.0.0" # Used as lowest common dominator

matrix:
include:
- node_js: "4.4.4"
os: osx

script:
- npm run coverage
- npm run package

after_script:
- "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"

cache:
directories:
- nexe/src

addons:
artifacts:
paths:
- $( ls deepstream* )
target_paths:
- $TRAVIS_REPO_SLUG

apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
27 changes: 27 additions & 0 deletions appveyor.yml
@@ -0,0 +1,27 @@
platform:
- x64

os:
- Visual Studio 2015

install:
- ps: Install-Product node 4.4.4
- npm install

test_script:
- node --version
- npm --version
- npm test
- npm run package

deploy:
provider: S3
access_key_id:
secure: cq7lgQP04314hwXwM2l0yiUKRcOkwHeKkDHFULrThxE=
secret_access_key:
secure: AMUWZVZ4o7lS6f5ogqxTTCqDUR/TYEmPaVXzb7yRRyFUTF/zQFnZHYk1G/j7ie8/
bucket: ds-server-artifacts
folder: deepstreamIO\deepstream.io
artifact: nexe\deepstream-*

build: off
164 changes: 164 additions & 0 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions package.js
@@ -0,0 +1,51 @@
var nexe = require( 'nexe' );
var os = require( 'os' );

var nodeVersion = '4.4.4';
var commit = process.env.TRAVIS_COMMIT || process.env.APPVEYOR_REPO_COMMIT || 'local';
var platform = os.platform();
var packageVersion = require( './package.json' ).version;

if( process.version.indexOf( nodeVersion ) === -1 ) {
console.log( 'We only compile nexe on Node version: ', nodeVersion );
process.exit();
}

// Only include first seven for it to be unique
commit = commit.substr( 0, 7 );

var ending;
switch( platform ) {
case 'win32':
ending = 'exe';
break;
case 'osx':
case 'darwin':
ending = 'osx';
break;
case 'linux':
ending = 'sh';
break;
default:
console.log( 'Unknown OS', platform );
process.exit();
}

console.log( "Compiling: nexe/deepstream-" + packageVersion + '-' + commit + '.' + ending );

nexe.compile({
"input": "start.js",
"output": "deepstream-" + packageVersion + '-' + commit + '.' + ending,
"nodeTempDir": "nexe/src",
"framework": "node",
"nodeVersion": nodeVersion,
"js-flags": "--use_strict",
nodeConfigureArgs: ['opt', 'val'], // for all your configure arg needs.
nodeMakeArgs: ["-j", "4"], // when you want to control the make process.
nodeVCBuildArgs: ["nosign", "x64"] // when you want to control the make process for windows.
}, function(err) {
if(err) {
return console.log(err);
process.exit( 1 );
}
});
9 changes: 8 additions & 1 deletion package.json
Expand Up @@ -12,17 +12,23 @@
"reporter": "node jasmine-runner",
"test": "jasmine JASMINE_CONFIG_PATH=jasmine.json",
"reporter": "node jasmine-runner",
"test-http-server": "node test/test-helper/start-test-server.js"
"test-http-server": "node test/test-helper/start-test-server.js",
"package": "node package.js"
},
"repository": {
"type": "git",
"url": "https://github.com/deepstreamIO/deepstream.io.git"
},
"optionalDependencies": {
"charset": "latest",
"uws": "latest"
},
"dependencies": {
"colors": "1.0.3",
"engine.io": "1.6.8",
"js-yaml": "^3.6.1",
"lodash.merge": "^4.4.0",
"engine.io": "1.6.9",
"minimist": "1.2.0"
},
"devDependencies": {
Expand All @@ -33,6 +39,7 @@
"istanbul": "^0.4.3",
"jasmine": "^2.4.1",
"jasmine-spec-reporter": "^2.4.0",
"nexe": "^1.1.2",
"proxyquire": "1.7.9",
"watch": "^0.18.0"
},
Expand Down

0 comments on commit 8c31f86

Please sign in to comment.