Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid file generated by dryice build when given a browserified file #2433

Closed
chmontgomery opened this issue Apr 1, 2015 · 3 comments
Closed

Comments

@chmontgomery
Copy link

I'm attempting to add a new worker js file, in this case for gherkin.

Specifically, I ran browserify against this set of files: https://github.com/cucumber/gherkin3/tree/master/javascript/lib/gherkin

Then, I took the browserify bundle, put it under \lib\ace\mode\gherkin\ and ran the ace build like so: node ./Makefile.dryice.js full --target ../ace-builds. After doing so, the build finishes with no errors and outputs invalid worker-gherkin.js files. For example, src-noconflict/worker-gherkin.js has the following invalid lines: function ace.define(name, deps, m) {. When I try to load it in the browser, I get these failures:
screen shot 2015-04-01 at 8 57 05 am

src/worker-gherkin.js does not load in the browser either. It throws the following errors:
screen shot 2015-04-01 at 8 55 48 am

Is this simply a limitation with dryice or how you've implemented it? I noticed the other worker files (csslint, json_parse, jshint, etc) are pre-wrapped with amd syntax. Is this an expectation? The strange thing is, if I wrap my browserified bundle with amd it still doesn't work. The only way I was able to get dryice to build my files properly was to have them as their original src files, wrapped with amd syntax, as seen in this PR: #2429.

At the end of the day, I would prefer to provide a browserify bundle instead of the loose src files.

@nightwing
Copy link
Member

You can use derequire to make browserify to work in the second case.
The first issue is a bug in https://github.com/ajaxorg/ace/blob/master/Makefile.dryice.js#L474

@chmontgomery
Copy link
Author

@nightwing thanks for the response. Ya that's what I was seeing.

@github-actions
Copy link

github-actions bot commented May 9, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants