Conversation
…s API for parse().
Lock masterminds/html5 to prevent jumping to 2.4 version
marcelovani
commented
Dec 5, 2018
| config.vm.provider "virtualbox" do |vb| | ||
| vb.memory = "1024" | ||
| end | ||
| end |
Author
There was a problem hiding this comment.
This Vagrant file is used to download all dependencies inside a VM. We could have an alternative docker file.
marcelovani
commented
Dec 5, 2018
| require_once ($autoload); | ||
| break; | ||
| } | ||
| } |
Author
There was a problem hiding this comment.
Allow the script to work from different folders
marcelovani
commented
Dec 5, 2018
| cp dist/validator-generated.php $PROJECT_PATH/src/Spec/ | ||
|
|
||
| echo "Generated files" | ||
| ls $PROJECT_PATH/src/Spec/*.php |
Author
There was a problem hiding this comment.
Adapted version of https://github.com/Automattic/amp-wp/blob/develop/bin/amphtml-update.sh
This script generates both the WP and Lullabot versions of validation rules
marcelovani
commented
Dec 5, 2018
| GeneratePHP(out_dir) | ||
|
|
||
| if __name__ == '__main__': | ||
| Main() |
Author
There was a problem hiding this comment.
Adapted version of https://github.com/Lullabot/amphtml/blob/php-validator-generated/validator/validator_gen_php.py
This file can run as standalone
marcelovani
commented
Dec 5, 2018
| "sebastian/diff": "^1.2 || ^2 || ^3", | ||
| "marc1706/fast-image-size": "1.*", | ||
| "masterminds/html5": "^2.2.0", | ||
| "masterminds/html5": "~2.0", |
marcelovani
commented
Dec 5, 2018
| { | ||
| // We embed a scanner so that $this->startTag() knows the current line number | ||
| $this->scanner = new Scanner($inputstream); | ||
| $this->scanner = new Scanner($data); |
marcelovani
commented
Dec 5, 2018
| // User options override default options in $this->options | ||
| $final_options = array_merge($this->options, $options); | ||
| $amp_tree_builder = new AMPDOMTreeBuilder($inputstream, $final_options); | ||
| $amp_tree_builder = new AMPDOMTreeBuilder($data, $final_options); |
marcelovani
commented
Dec 7, 2018
| }, | ||
| "bin": [ | ||
| "bin/amp-console" | ||
| ] |
Author
There was a problem hiding this comment.
Put the executable inside vendor/bin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On this pull request I did the following:
See Lullabot#231