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

Disable PhantomJS HTML parser by default #143

Closed
robhrt7 opened this issue May 14, 2015 · 1 comment
Closed

Disable PhantomJS HTML parser by default #143

robhrt7 opened this issue May 14, 2015 · 1 comment
Milestone

Comments

@robhrt7
Copy link
Member

robhrt7 commented May 14, 2015

In SourceJS 0.4 we introduced HTML API, that allows to cache the results of all code examples from the specs (.source_example blocks). Using this API via REST, engine allows to cover custom usage scenarios like testing code in environments where it's not possible to dynamically render HTML or using tools like Lego.

But since these scenarios are not that popular, we decided to turn off HTML parser by default, and in 0.6.0 transfer it to separate plugin (removing only parser part from core). REST API and HTML storage will be always available in the core, but to use PhantomJS parser, which allows to re-cache all the examples with the start of the app, or using cron, you will need to install separate SourceJS plugin.

In 0.5.3 feature will be still left in the core, but to enable it, you will need to define this option:

source/options.js

module.exports = {
    plugins: {
        htmlParser: {
            enabled: true,
            onStart: true
        }
    },
};

We still have big plans for HTML API in SourceJS, especially in combination with tools like Lego and others for designing in the browser, but to keep core clean we will be separating specific features to external plugins (with official support).

@robhrt7 robhrt7 added this to the 0.5.3 milestone May 14, 2015
@robhrt7
Copy link
Member Author

robhrt7 commented May 14, 2015

HTML parser is now prepared for separation and turned off by default 4e4d720

@robhrt7 robhrt7 closed this as completed May 14, 2015
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

No branches or pull requests

1 participant