jrutter / Contentful-WYSIWYG-Editor

Uses the summernote WYSIWYG HTML editor as an UI extension for contentful.
http://www.onerutter.com/cms/how-to-create-a-contentful-ui-extension.html
14 stars 10 forks source link

fix syntax errors regarding gulp bundle #2

Closed TobiasKrogh closed 6 years ago

TobiasKrogh commented 7 years ago

Hi @jrutter,

I tried to follow the instructions from the README.md but stumbled upon the following error:

[11:46:12] Using gulpfile ~/dev/extensions/samples/Contentful-WYSIWYG-Editor/gulpfile.js
[11:46:12] Starting 'stylus'...
[11:46:12] Finished 'stylus' after 11 ms
[11:46:12] Starting 'build'...
[11:46:12] Finished 'build' after 60 ms
[11:46:12] Starting 'bundle'...

events.js:182
      throw er; // Unhandled 'error' event
      ^
Error
    at new JS_Parse_Error (/Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:196:18)
    at js_error (/Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:204:11)
    at croak (/Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:680:9)
    at token_error (/Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:688:9)
    at unexpected (/Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:694:9)
    at as_property_name (/Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:1282:13)
    at /Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:1236:24
    at /Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:727:24
    at expr_atom (/Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:1187:35)
    at maybe_unary (/Users/tobiaskrogh/dev/extensions/samples/Contentful-WYSIWYG-Editor/node_modules/inline-source/node_modules/uglify-js/lib/parse.js:1363:19)

I looked through the code and found a syntax error in src/app.js and fixed it. Do not know whether this repo is still actively maintained. Anyhow :-)

TobiasKrogh commented 7 years ago

after fixing the output looks fine:

[11:47:41] Using gulpfile ~/dev/extensions/samples/Contentful-WYSIWYG-Editor/gulpfile.js
[11:47:41] Starting 'stylus'...
[11:47:41] Finished 'stylus' after 12 ms
[11:47:41] Starting 'build'...
[11:47:41] Finished 'build' after 51 ms
[11:47:41] Starting 'bundle'...
[11:47:41] Finished 'bundle' after 50 ms
jrutter commented 6 years ago

Thanks @TobiasKrogh for helping to fix this!