Skip to content

Commit abf044c

Browse files
author
fabianmoronzirfas
committed
Merge branch 'works-on-global-install'
2 parents 9faae3a + 0be36e8 commit abf044c

File tree

7 files changed

+427
-31
lines changed

7 files changed

+427
-31
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

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ notifications:
88
node_js:
99
- '6'
1010
before_install:
11-
- npm i -g npm@^6.0.0
11+
- npm i -g npm@^5.6.0
1212
before_script:
1313
- npm prune
1414
script:

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ This tool currently needs npm version 3.x or higher due to the flattened folder
1717
We recommend using it as a local dependency\*
1818

1919
- `npm install extendscriptr --save-dev`
20-
- `./node_modules/.bin/extendscriptr --script src/scripts/helloWorld.js --output dist/helloWord.js`
20+
- `extendscriptr --script src/scripts/helloWorld.js --output dist/helloWord.js`
2121
- open the outputted file with ExtendScript Toolkit OR place your script in the relevant application script folder
2222
- run it
2323

24-
\* a _global install is currently not working due to the fact that ExtendScript is missing to many functions. See [this issue](https://github.com/ExtendScript/extendscriptr/issues/22)_
25-
2624
### Watch mode
2725

2826
Exstendscriptr does not have any built-in _watch_ capability, but you can accomplish this using the [watch](https://www.npmjs.com/package/watch) module:

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)