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

update runmode-standalone to match core and runmode.node.js #6311

Closed

Conversation

BrianHung
Copy link
Contributor

This PR does the following:

  • updates splitLines to match runmode.node.js
    This just follows changes made to runmode.node.js made in 0bc820b

  • updates getMode to match core and runmode.node.js
    This just follows changes made to runmode.node.js made in 0bc820b.
    Function was mainly taken from modes.js.

  • updates resolveMode to match core
    Function was mainly taken from modes.js.

  • includes extendMode to match core and runmode.node.js
    This just follows the changes made to runmode.node.js made in 0bc820b
    Function was mainly taken from modes.js.

  • includes innerMode to match core
    This just follows the changes made to runmode.node.js made in deaa842
    Function was mainly taken from modes.js. This is needed for markdown to work in standalone.

  • includes copyState to match core
    Function was mainly taken from modes.js. This is needed for markdown to work in standalone.

  • updates StringStream to match core
    This just follows the changes made to runmode.node.js made in 0bc820b, later changes made to util/StringStream, and the previous commit to runmode-standalone.

@BrianHung BrianHung changed the title runmode standalone update update runmode-standalone to match core and runmode.node.js Jun 10, 2020
@marijnh
Copy link
Member

marijnh commented Jun 10, 2020

Would you be interested in researching if it would be hard to run rollup on a script importing this functionality directly from src/ (maybe rearranging some of the code to make the tree-shaking work and avoid pulling in irrelevant code) to create this file, instead of duplicating the code? The current approach comes from a time before the library used any bundler or module system, and at this point it's both a constant source of problems and a bit of an embarrassment.

@BrianHung
Copy link
Contributor Author

BrianHung commented Jun 10, 2020

Sure, I can't guarantee anything though. Working through this PR, I found that the only files from src needed are src/modes.js, src/utils/StringStream.js and src/utils/misc.js so most of the core in src isn't needed.

Edit: Some progress... Right now, it's bundling everything it needs from src/ instead of importing directly.

@marijnh
Copy link
Member

marijnh commented Jun 21, 2020

Replaced by #6314

@marijnh marijnh closed this Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants