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

Commit 6780bd0

Browse files
committed
define version in config.js
1 parent 68ac68b commit 6780bd0

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
'use strict';
22

33
exports.id = 'com.add0n.stylus';
4+
exports.version = '0.1.4';
45

56
exports.ids = {
67
chrome: [
7-
'hhdaknihlbgjoaiaceldhnbbmogabcpk', // Stylus External Editor Integration (Chrome)
8-
'bfkhfaldfclkfjdmgfibhknpoiaoelih', // Stylus External Editor Integration (Opera)
8+
'mhjehpjceoajlmldfbelpnbapmcnabfe', // Stylus External Editor Integration (Chrome)
9+
'djlnckfpakjlpfddhboajjmaeljfaacn', // Stylus External Editor Integration (Opera)
910
],
1011
firefox: [
1112
'95fce6c2e847856344b2156491239d95f56c7fc1@temporary-addon', // Stylus External Editor Integration

host.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
'use strict';
22

3-
var config = {
4-
version: '0.1.3'
5-
};
3+
var config = require('./config.js');
4+
65
// closing node when parent process is killed
76
process.stdin.resume();
87
process.stdin.on('end', () => process.exit());
@@ -24,16 +23,16 @@ function observe (request, push, done) {
2423
process.addListener('uncaughtException', exception);
2524

2625
if (request.method === 'spec') {
27-
push(Object.assign(config, {
26+
push({
27+
version: config.version,
2828
env: process.env,
2929
release: process.release,
3030
platform: process.platform,
3131
arch: process.arch,
32-
versions: process.versions
33-
}, {
32+
versions: process.versions,
3433
separator: require('path').sep,
3534
tmpdir: require('os').tmpdir()
36-
}));
35+
});
3736
close();
3837
}
3938
else if ('script' in request) {
@@ -43,6 +42,7 @@ function observe (request, push, done) {
4342
env: process.env,
4443
push,
4544
close,
45+
args: request.args,
4646
// only allow internal modules that extension already requested permission for
4747
require: (name) => (request.permissions || []).indexOf(name) === -1 ? null : require(name)
4848
};

linux/app/install.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ function application (callback) {
9494
fs.chmodSync(path.join(dir, 'node'), '0755');
9595
}
9696
fs.createReadStream('host.js').pipe(fs.createWriteStream(path.join(dir, 'host.js')));
97+
fs.createReadStream('config.js').pipe(fs.createWriteStream(path.join(dir, 'config.js')));
9798
fs.createReadStream('messaging.js').pipe(fs.createWriteStream(path.join(dir, 'messaging.js')));
9899
callback();
99100
});

mac/app/install.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ function application (callback) {
9797
fs.chmodSync(path.join(dir, 'node'), '0755');
9898
}
9999
fs.createReadStream('host.js').pipe(fs.createWriteStream(path.join(dir, 'host.js')));
100+
fs.createReadStream('config.js').pipe(fs.createWriteStream(path.join(dir, 'config.js')));
100101
fs.createReadStream('messaging.js').pipe(fs.createWriteStream(path.join(dir, 'messaging.js')));
101102

102103
callback();

windows/app/install.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ function application (callback) {
6161
throw e;
6262
}
6363
fs.createReadStream('host.js').pipe(fs.createWriteStream(path.join(dir, 'host.js')));
64+
fs.createReadStream('config.js').pipe(fs.createWriteStream(path.join(dir, 'config.js')));
6465
fs.createReadStream('messaging.js').pipe(fs.createWriteStream(path.join(dir, 'messaging.js')));
6566
try {
6667
fs.createReadStream(process.argv[0]).pipe(fs.createWriteStream(path.join(dir, 'node.exe')));

0 commit comments

Comments
 (0)