Skip to content

Commit 34ae35f

Browse files
author
Bruno Herfst
committed
Fixes #38 Global install still not working
1 parent cf00409 commit 34ae35f

File tree

5 files changed

+18
-5590
lines changed

5 files changed

+18
-5590
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"presets": [
3-
"es2015"
3+
"env"
44
],
55
"plugins": [
66
"babel-plugin-transform-es3-member-expression-literals",

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ node_modules
33
test/dist
44
.tmp
55
npm-debug.log
6+
7+
package-lock.json

index.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ extendscriptr
1515
.parse(process.argv);
1616

1717
console.log('Running extendscriptr with following options:');
18+
1819
extendscriptr.options.forEach(function(opt) {
1920
if (opt.long === '--version') return;
2021
var optionName = opt.long.replace('--', '');
@@ -29,24 +30,24 @@ var prototypePolyfills = fs.readFileSync(require.resolve('extendscript.prototype
2930
var browserifyPlugins = [ [ prependify, prototypePolyfills ] ];
3031

3132
var adobeTarget = String(extendscriptr.target).toLowerCase();
32-
if ( adobeTarget &&
33-
(adobeTarget.indexOf('indesign') >= 0 ||
34-
adobeTarget.indexOf('photoshop') >= 0 ||
35-
adobeTarget.indexOf('illustrator') >= 0 ||
36-
adobeTarget.indexOf('aftereffects') >= 0)) {
33+
if( adobeTarget &&
34+
( adobeTarget.indexOf('indesign') >= 0 ||
35+
adobeTarget.indexOf('photoshop') >= 0 ||
36+
adobeTarget.indexOf('illustrator') >= 0 ||
37+
adobeTarget.indexOf('aftereffects') >= 0)) {
3738
browserifyPlugins.push([ prependify, '#target ' + extendscriptr.target + '\n' ]);
38-
}
39+
};
3940

4041
var b = browserify({
4142
entries: [ extendscriptr.script ],
42-
transform: [['babelify', {
43+
transform: [[require.resolve('babelify'), {
4344
presets: [
44-
'es2015'
45+
'env'
4546
],
4647
plugins: [
47-
'babel-plugin-transform-es3-member-expression-literals',
48-
'babel-plugin-transform-es3-property-literals',
49-
'babel-plugin-transform-es5-property-mutators'
48+
require.resolve('babel-plugin-transform-es3-member-expression-literals'),
49+
require.resolve('babel-plugin-transform-es3-property-literals'),
50+
require.resolve('babel-plugin-transform-es5-property-mutators')
5051
]
5152
}]],
5253
plugin: browserifyPlugins

0 commit comments

Comments
 (0)