Permalink
Browse files

Adds appjs main module + managing to generate platform specific modules.

  • Loading branch information...
1 parent aa1d8f6 commit 09d75e3631637b19c7a80272f32d8a465ddcf786 @milani milani committed Jun 29, 2012
Showing with 84 additions and 9 deletions.
  1. +4 −0 .npmignore
  2. +17 −9 binding.gyp
  3. +16 −0 data/common/appjs/binding.gyp
  4. +3 −0 data/common/appjs/index.js
  5. +44 −0 data/common/appjs/package.json
View
@@ -3,3 +3,7 @@ node_modules/
appjs.sublime*
deps/
publish/
+data/linux/node-bin/ia32/node
+data/linux/node-bin/x64/node
+data/mac/node-bin/node
+data/win/node-bin/node
View
@@ -13,13 +13,21 @@
'outputs':[''],
'conditions':[
['OS!="win"', {
- 'action':['<(module_root_dir)/data/add-dependencies.sh','<(module_root_dir)/publish/node_modules/appjs']
+ 'action':['<(module_root_dir)/data/add-dependencies.sh','<(module_root_dir)/publish/node_modules/appjs-<(OS)']
}],
['OS=="win"', {
- 'action':['"<(module_root_dir)/data/add-dependencies.bat"','<(module_root_dir)/publish/node_modules/appjs']
+ 'action':['"<(module_root_dir)/data/add-dependencies.bat"','<(module_root_dir)/publish/node_modules/appjs-<(OS)']
}]
]
},
+ ],
+ 'copies':[
+ {
+ 'destination': '<(module_root_dir)/publish/node_modules/',
+ 'files': [
+ '<(module_root_dir)/data/common/appjs'
+ ]
+ }
]
},
{
@@ -30,7 +38,7 @@
],
'copies':[
{
- 'destination': '<(module_root_dir)/publish/node_modules/appjs',
+ 'destination': '<(module_root_dir)/publish/node_modules/appjs-<(OS)',
'files': [
'<(module_root_dir)/lib',
'<(module_root_dir)/index.js',
@@ -55,15 +63,15 @@
]
},
{
- 'destination': '<(module_root_dir)/publish/node_modules/appjs/build/Release',
+ 'destination': '<(module_root_dir)/publish/node_modules/appjs-mac/build/Release',
'files': [
'<(module_root_dir)/deps/cef/Release/lib.target/libcef.dylib',
'<(module_root_dir)/deps/cef/Release/lib.target/ffmpegsumo.so',
'<(PRODUCT_DIR)/appjs.node'
],
},
{
- 'destination': '<(module_root_dir)/publish/node_modules/appjs',
+ 'destination': '<(module_root_dir)/publish/node_modules/appjs-mac',
'files': [
'<(module_root_dir)/data/mac/package.json',
],
@@ -91,14 +99,14 @@
]
},
{
- 'destination': '<(module_root_dir)/publish/node_modules/appjs/build/Release',
+ 'destination': '<(module_root_dir)/publish/node_modules/appjs-linux/build/Release',
'files': [
'<(module_root_dir)/deps/cef/Release/lib.target/libcef.so',
'<(PRODUCT_DIR)/appjs.node'
],
},
{
- 'destination': '<(module_root_dir)/publish/node_modules/appjs',
+ 'destination': '<(module_root_dir)/publish/node_modules/appjs-linux',
'files': [
'<(module_root_dir)/data/linux/package.json',
],
@@ -134,7 +142,7 @@
]
},
{
- 'destination': '<(module_root_dir)/publish/node_modules/appjs/build/Release',
+ 'destination': '<(module_root_dir)/publish/node_modules/appjs-win/build/Release',
'files': [
'<(module_root_dir)/deps/cef/Release/libcef.dll',
'<(module_root_dir)/deps/cef/Release/avcodec-54.dll',
@@ -149,7 +157,7 @@
],
},
{
- 'destination': '<(module_root_dir)/publish/node_modules/appjs',
+ 'destination': '<(module_root_dir)/publish/node_modules/appjs-win',
'files': [
'<(module_root_dir)/data/win/package.json',
],
@@ -0,0 +1,16 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'add-dependencies',
+ 'type':'none',
+ 'actions':[
+ {
+ 'action_name':'npm',
+ 'inputs':[''],
+ 'outputs':[''],
+ 'action':['npm','install','appjs-<(OS)']
+ },
+ ]
+ }
+ ]
+}
@@ -0,0 +1,3 @@
+module.exports = require('appjs-' + process.platform);
+
+
@@ -0,0 +1,44 @@
+{
+ "name": "appjs",
+ "description": "AppJS is a SDK on top of nodejs to develop desktop applications using HTML/CSS/JS",
+ "version": "0.0.13",
+ "keywords": [
+ "cef",
+ "webkit",
+ "browser",
+ "canvas",
+ "html5",
+ "desktop",
+ "native",
+ "gtk",
+ "ui",
+ "sdk"
+ ],
+ "target":"mac",
+ "homepage": "http://appjs.org",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/milani/appjs"
+ },
+ "author": {
+ "name": "Morteza Milani",
+ "email": "mrtz.milani@gmail.com"
+ },
+ "directories": {},
+ "main": "./index.js",
+ "engines": {
+ "node": "0.6 || 0.8"
+ },
+ "scripts": {
+ "install":"node-gyp rebuild"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "optionalDependencies": {},
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/milani/appjs/blob/master/LICENSE"
+ }
+ ]
+}

0 comments on commit 09d75e3

Please sign in to comment.