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

Amphtml generator update #6

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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 Nov 21, 2018
84f8849
Updated variable name
marcelovani Nov 21, 2018
5c833ab
Updated css error constant
marcelovani Nov 21, 2018
5b35317
Updated css error constant
marcelovani Nov 21, 2018
acd3ed6
Attributes can be arrays
marcelovani Nov 21, 2018
7835c7f
Lock masterminds/html5 to prevent jumping to 2.4 version which change…
karens Nov 29, 2018
071ce5f
Need last digit
karens Nov 29, 2018
54a79b5
Merge pull request #252 from Lullabot/restrict-masterminds
karens Nov 29, 2018
35878b3
Use latest version
marcelovani Dec 4, 2018
55cef3d
Fixing autoload
marcelovani Dec 5, 2018
41e1017
Typo
marcelovani Dec 5, 2018
ffd3478
Moved scripts from amphtml to here
marcelovani Dec 5, 2018
08d4499
Added vagrantfile
marcelovani Dec 5, 2018
33739b4
Made script executable
marcelovani Dec 5, 2018
9bd3614
Copy to the right folder
marcelovani Dec 5, 2018
d3556d8
Make it less verbose
marcelovani Dec 5, 2018
1236d55
Make it less verbose
marcelovani Dec 5, 2018
78fe45b
Install php
marcelovani Dec 5, 2018
34875ef
Ensure folder is created
marcelovani Dec 5, 2018
b1e9841
Ignore files
marcelovani Dec 5, 2018
bd5fc06
Improved messages
marcelovani Dec 5, 2018
96ba4ee
Moved amp-console to bin folder
marcelovani Dec 5, 2018
63c1c0c
Reverted files
marcelovani Dec 5, 2018
f6938b4
Updating provisioning
marcelovani Dec 5, 2018
c0a7894
Updating provisioning
marcelovani Dec 5, 2018
4e6f6ef
Tyding up script
marcelovani Dec 5, 2018
23d6d37
Undo change
marcelovani Dec 5, 2018
0ffaa2e
Revert changes
marcelovani Dec 5, 2018
25de766
Reverted changes
marcelovani Dec 5, 2018
b9beaee
Reverted change
marcelovani Dec 5, 2018
016288e
Whitespaces
marcelovani Dec 5, 2018
bff03d1
Fixing autoload
marcelovani Dec 6, 2018
2d0a28e
Fixing autoload
marcelovani Dec 6, 2018
14ef687
Changed min stability
marcelovani Dec 6, 2018
dbe8a47
Make it work with relative paths.
marcelovani Dec 6, 2018
9d43a70
Trying to make it run from bin folder
marcelovani Dec 7, 2018
7414f14
Improving autoloader
marcelovani Dec 7, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ composer.lock
vendor/**
.idea
coverage/**
.vagrant
*.log
36 changes: 36 additions & 0 deletions Vagrantfile
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
Copy link
Author

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.

10 changes: 9 additions & 1 deletion amp-console → bin/amp-console
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@

// amp-console.php
error_reporting(E_ALL ^ E_NOTICE);
require __DIR__.'/vendor/autoload.php';

// Include autoloader so that it can be executed as stand alone or inside a project.
foreach ([__DIR__ . '/../../../', dirname(__FILE__) . '/../vendor'] as $dir) {
$autoloader = realpath($dir) . '/autoload.php';
if (file_exists($autoloader)) {
require_once ($autoloader);
break;
}
}
Copy link
Author

Choose a reason for hiding this comment

The 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;
Expand Down
Loading