forked from Lullabot/amp-library
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Amphtml generator update #6
Open
marcelovani
wants to merge
37
commits into
master
Choose a base branch
from
amphtml-generator
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+15,778
−14
Open
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
79b37a9
Updated api changes on Masterminds/html5-php
marcelovani 84f8849
Updated variable name
marcelovani 5c833ab
Updated css error constant
marcelovani 5b35317
Updated css error constant
marcelovani acd3ed6
Attributes can be arrays
marcelovani 7835c7f
Lock masterminds/html5 to prevent jumping to 2.4 version which change…
karens 071ce5f
Need last digit
karens 54a79b5
Merge pull request #252 from Lullabot/restrict-masterminds
karens 35878b3
Use latest version
marcelovani 55cef3d
Fixing autoload
marcelovani 41e1017
Typo
marcelovani ffd3478
Moved scripts from amphtml to here
marcelovani 08d4499
Added vagrantfile
marcelovani 33739b4
Made script executable
marcelovani 9bd3614
Copy to the right folder
marcelovani d3556d8
Make it less verbose
marcelovani 1236d55
Make it less verbose
marcelovani 78fe45b
Install php
marcelovani 34875ef
Ensure folder is created
marcelovani b1e9841
Ignore files
marcelovani bd5fc06
Improved messages
marcelovani 96ba4ee
Moved amp-console to bin folder
marcelovani 63c1c0c
Reverted files
marcelovani f6938b4
Updating provisioning
marcelovani c0a7894
Updating provisioning
marcelovani 4e6f6ef
Tyding up script
marcelovani 23d6d37
Undo change
marcelovani 0ffaa2e
Revert changes
marcelovani 25de766
Reverted changes
marcelovani b9beaee
Reverted change
marcelovani 016288e
Whitespaces
marcelovani bff03d1
Fixing autoload
marcelovani 2d0a28e
Fixing autoload
marcelovani 14ef687
Changed min stability
marcelovani dbe8a47
Make it work with relative paths.
marcelovani 9d43a70
Trying to make it run from bin folder
marcelovani 7414f14
Improving autoloader
marcelovani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ composer.lock | |
vendor/** | ||
.idea | ||
coverage/** | ||
.vagrant | ||
*.log |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
$script = <<-SCRIPT | ||
echo Provisioning… | ||
sudo apt-get update | ||
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - | ||
sudo apt-get -y install nodejs | ||
sudo apt-get -y install default-jdk protobuf-compiler python-protobuf python npm | ||
sudo apt-get -y install php7.0-cli php-dom phpunit | ||
sudo apt-get -y install composer | ||
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | ||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | ||
sudo apt-get update && sudo apt-get -y install yarn | ||
SCRIPT | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.provision "shell", inline: $script | ||
|
||
config.vm.box = "apnunes/xenial-python" | ||
config.vm.box_version = "1.0.0" | ||
|
||
config.ssh.forward_agent = true | ||
|
||
config.vm.boot_timeout = 900 | ||
|
||
config.vm.network "forwarded_port", guest: 22, host: 2229 | ||
config.vm.network "forwarded_port", guest: 80, host: 8081, auto_correct:config | ||
|
||
config.vm.network "private_network", ip: "192.168.33.10" | ||
|
||
config.vm.synced_folder ".", "/vagrant", type: "nfs" | ||
config.vm.provider "virtualbox" do |vb| | ||
vb.memory = "1024" | ||
end | ||
end | ||
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,16 @@ | |
|
||
// amp-console.php | ||
error_reporting(E_ALL ^ E_NOTICE); | ||
require __DIR__.'/vendor/autoload.php'; | ||
|
||
// Include autoloader. | ||
foreach ([getcwd(), __DIR__] as $dir) { | ||
chdir($dir . '/../../../'); | ||
$autoload = getcwd() . '/autoload.php'; | ||
if (file_exists($autoload)) { | ||
require_once ($autoload); | ||
break; | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allow the script to work from different folders |
||
|
||
use Lullabot\AMP\AmpCommand; | ||
use Symfony\Component\Console\Application; | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Vagrant file is used to download all dependencies inside a VM. We could have an alternative docker file.