Skip to content
This repository has been archived by the owner on Jun 3, 2018. It is now read-only.

Commit

Permalink
define version in config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
schomery committed Jun 22, 2017
1 parent 68ac68b commit 6780bd0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
5 changes: 3 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
'use strict';

exports.id = 'com.add0n.stylus';
exports.version = '0.1.4';

exports.ids = {
chrome: [
'hhdaknihlbgjoaiaceldhnbbmogabcpk', // Stylus External Editor Integration (Chrome)
'bfkhfaldfclkfjdmgfibhknpoiaoelih', // Stylus External Editor Integration (Opera)
'mhjehpjceoajlmldfbelpnbapmcnabfe', // Stylus External Editor Integration (Chrome)
'djlnckfpakjlpfddhboajjmaeljfaacn', // Stylus External Editor Integration (Opera)
],
firefox: [
'95fce6c2e847856344b2156491239d95f56c7fc1@temporary-addon', // Stylus External Editor Integration
Expand Down
14 changes: 7 additions & 7 deletions host.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use strict';

var config = {
version: '0.1.3'
};
var config = require('./config.js');

// closing node when parent process is killed
process.stdin.resume();
process.stdin.on('end', () => process.exit());
Expand All @@ -24,16 +23,16 @@ function observe (request, push, done) {
process.addListener('uncaughtException', exception);

if (request.method === 'spec') {
push(Object.assign(config, {
push({
version: config.version,
env: process.env,
release: process.release,
platform: process.platform,
arch: process.arch,
versions: process.versions
}, {
versions: process.versions,
separator: require('path').sep,
tmpdir: require('os').tmpdir()
}));
});
close();
}
else if ('script' in request) {
Expand All @@ -43,6 +42,7 @@ function observe (request, push, done) {
env: process.env,
push,
close,
args: request.args,
// only allow internal modules that extension already requested permission for
require: (name) => (request.permissions || []).indexOf(name) === -1 ? null : require(name)
};
Expand Down
1 change: 1 addition & 0 deletions linux/app/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function application (callback) {
fs.chmodSync(path.join(dir, 'node'), '0755');
}
fs.createReadStream('host.js').pipe(fs.createWriteStream(path.join(dir, 'host.js')));
fs.createReadStream('config.js').pipe(fs.createWriteStream(path.join(dir, 'config.js')));
fs.createReadStream('messaging.js').pipe(fs.createWriteStream(path.join(dir, 'messaging.js')));
callback();
});
Expand Down
1 change: 1 addition & 0 deletions mac/app/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function application (callback) {
fs.chmodSync(path.join(dir, 'node'), '0755');
}
fs.createReadStream('host.js').pipe(fs.createWriteStream(path.join(dir, 'host.js')));
fs.createReadStream('config.js').pipe(fs.createWriteStream(path.join(dir, 'config.js')));
fs.createReadStream('messaging.js').pipe(fs.createWriteStream(path.join(dir, 'messaging.js')));

callback();
Expand Down
1 change: 1 addition & 0 deletions windows/app/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function application (callback) {
throw e;
}
fs.createReadStream('host.js').pipe(fs.createWriteStream(path.join(dir, 'host.js')));
fs.createReadStream('config.js').pipe(fs.createWriteStream(path.join(dir, 'config.js')));
fs.createReadStream('messaging.js').pipe(fs.createWriteStream(path.join(dir, 'messaging.js')));
try {
fs.createReadStream(process.argv[0]).pipe(fs.createWriteStream(path.join(dir, 'node.exe')));
Expand Down

0 comments on commit 6780bd0

Please sign in to comment.