Skip to content

Commit be2f910

Browse files
author
Lucas Vogel
committed
Removed full polyfills and use the extendscript.prototypes npm module instead
1 parent 56f913e commit be2f910

File tree

9 files changed

+46
-13561
lines changed

9 files changed

+46
-13561
lines changed

.babelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"presets": [
3-
"es2015",
4-
"stage-0"
3+
"es2015"
54
],
65
"plugins": [
76
"babel-plugin-transform-es3-member-expression-literals",

.npmignore

Whitespace-only changes.

package.json

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
{
2-
"name": "es2015-2-extendScript-build",
2+
"name": "extendscriptr",
33
"version": "1.0.0",
44
"description": "A node build configuration to develop extendScripts with es2015 javascript code",
55
"scripts": {
66
"clean:temp": "rm -rf ./.tmp",
77
"clean:dist": "rm -rf ./dist",
88
"clean": "npm run clean:temp & npm run clean:dist ; mkdir dist & mkdir .tmp",
9-
"insert-polyfill:own": "cat ./src/lib/polyfills.js >> ./dist/output.js",
10-
"insert-polyfill:babel": "cat ./src/lib/babel-polyfill.js >> ./dist/output.js",
11-
"insert-polyfill:coreJs": "cat ./src/lib/coreJsShim.js >> ./dist/output.js",
9+
"insert-polyfills": "cat ./node_modules/extendscript.prototypes/dist/extendscript.prototypes.0.0.5.jsx >> ./dist/output.js",
1210
"insert-bundle": "cat ./.tmp/script.js >> ./dist/output.js",
13-
"bundle": "browserify -e -o .tmp/script.js -t [ babelify ]",
14-
"compile": "npm run clean ; npm run insert-polyfill:own ; npm run insert-polyfill:coreJs ; npm run bundle ; npm run insert-bundle ; npm run clean:temp",
11+
"bundle": "browserify -e ./src/index.js -o .tmp/script.js -t [ babelify ]",
12+
"compile": "npm run clean ; npm run insert-polyfills ; npm run bundle ; npm run insert-bundle ; npm run clean:temp",
1513
"start": "npm run compile"
1614
},
1715
"repository": {
1816
"type": "git",
19-
"url": "git+https://github.com/vogelino/es2015-2-extendScript-build.git"
17+
"url": "git+https://github.com/vogelino/extendscriptr.git"
2018
},
2119
"keywords": [
2220
"automation",
@@ -34,18 +32,17 @@
3432
"author": "vogelino",
3533
"license": "WTFPL",
3634
"bugs": {
37-
"url": "https://github.com/vogelino/es2015-2-extendScript-build/issues"
35+
"url": "https://github.com/vogelino/extendscriptr/issues"
3836
},
39-
"homepage": "https://github.com/vogelino/es2015-2-extendScript-build#readme",
40-
"devDependencies": {
37+
"homepage": "https://github.com/vogelino/extendscriptr#readme",
38+
"dependencies": {
4139
"babel": "^6.5.2",
4240
"babel-plugin-transform-es3-member-expression-literals": "^6.5.0",
4341
"babel-plugin-transform-es3-property-literals": "^6.5.0",
4442
"babel-plugin-transform-es5-property-mutators": "^6.6.5",
45-
"babel-polyfill": "^6.7.4",
4643
"babel-preset-es2015": "^6.6.0",
47-
"babel-preset-stage-0": "^6.5.0",
4844
"babelify": "^7.3.0",
49-
"browserify": "^13.0.0"
45+
"browserify": "^13.0.0",
46+
"extendscript.prototypes": "0.0.5"
5047
}
5148
}

src/example/index.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/index.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import * as lib from './libs/lib';
2+
3+
lib.write(`Hello World ${lib.calc()} ${lib.something}`);
4+
5+
const width = 100;
6+
const height = 100;
7+
const doc = app.documents.add(null,width,height);
8+
9+
const m = 30;
10+
const path1 = doc.pathItems.add();
11+
path1.setEntirePath ([
12+
[m,m],
13+
[m,height-m],
14+
[width-m,height-m],
15+
[width-m,m]
16+
]);
17+
18+
const text1 = doc.textFrames.areaText( path1 );
19+
text1.contents = '"She knew that technology was \
20+
a means to an end — and that the end was people. \
21+
She saw it as something you needed to get to the \
22+
real work: improving people’s lives, making them \
23+
feel more connected, bringing delight in big and \
24+
small ways, and empowering them to affect change."';
25+
26+
const fontStyle = text1.textRange.characterAttributes;
27+
fontStyle.textFont = app.textFonts.getByName("Courier");
28+
fontStyle.size = 2.5;

0 commit comments

Comments
 (0)