Difference between revisions of "ARK2/Install"
(→Install) |
(→macOS) |
||
Line 27: | Line 27: | ||
* Install the Command Line Tools (includes Git) | * Install the Command Line Tools (includes Git) | ||
* Download and install [http://brew.sh/ HomeBrew] | * Download and install [http://brew.sh/ HomeBrew] | ||
+ | * Modify your .profile to add brew packages to your $PATH | ||
+ | export PATH=/usr/local/bin:/usr/local/sbin:$PATH | ||
* <pre>brew install homebrew/php/composer homebrew/completions/composer-completion homebrew/php/php-cs-fixer homebrew/php/php-code-sniffer homebrew/php/sqlformat homebrew/php/phplint</pre> | * <pre>brew install homebrew/php/composer homebrew/completions/composer-completion homebrew/php/php-cs-fixer homebrew/php/php-code-sniffer homebrew/php/sqlformat homebrew/php/phplint</pre> | ||
* If you need to do front end development you will also need <pre>brew install node tidy-html5</pre> | * If you need to do front end development you will also need <pre>brew install node tidy-html5</pre> | ||
Line 35: | Line 37: | ||
GIT_PS1_SHOWDIRTYSTATE=true | GIT_PS1_SHOWDIRTYSTATE=true | ||
PS1='\u@\h \W$(__git_ps1 " (%s)") \$ ' | PS1='\u@\h \W$(__git_ps1 " (%s)") \$ ' | ||
− | |||
− | |||
− | |||
The easiest way to run a webserver and database server is using [https://www.mamp.info/en/ MAMP]. Simply install MAMP and create a soft-link from the MAMP webroot to the location of your ARK git repository. The alternative is to use HomeBrew to configure and run your own install. The HomeBrew method is recommended for developing with PostgreSQL (TODO). | The easiest way to run a webserver and database server is using [https://www.mamp.info/en/ MAMP]. Simply install MAMP and create a soft-link from the MAMP webroot to the location of your ARK git repository. The alternative is to use HomeBrew to configure and run your own install. The HomeBrew method is recommended for developing with PostgreSQL (TODO). |
Revision as of 19:54, 19 January 2017
Install
Git / Github
Development is hosted on Github, so you will need a free Github account to contribute code.
If you are new to Git, you may find the Github desktop application easier to use. Alternatives are SourceTree and GitKraken.
Environment
To develop ARK requires the following tools to be installed:
You will also require PHP, a web server (Apache/PHP), a database server (MySQL/PostreSQL/SQLite), a web browser (Chrome/Firefox), and a an API client (Postman).
The following tools are recommend to adhere to ARK code quality standards:
- php-cs-fixer
- PHP CodeSniffer
macOS
On macOS, while you can install the requirements via standalone packages, we recommend using HomeBrew as it makes installing and updating all the tools used easier.
- Install XCode
- Install the Command Line Tools (includes Git)
- Download and install HomeBrew
- Modify your .profile to add brew packages to your $PATH
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
-
brew install homebrew/php/composer homebrew/completions/composer-completion homebrew/php/php-cs-fixer homebrew/php/php-code-sniffer homebrew/php/sqlformat homebrew/php/phplint
- If you need to do front end development you will also need
brew install node tidy-html5
- (Optional) Modify your .profile to enable command-line auto-complete
export HOMEBREW_GITHUB_API_TOKEN="token" source /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash source /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh GIT_PS1_SHOWDIRTYSTATE=true PS1='\u@\h \W$(__git_ps1 " (%s)") \$ '
The easiest way to run a webserver and database server is using MAMP. Simply install MAMP and create a soft-link from the MAMP webroot to the location of your ARK git repository. The alternative is to use HomeBrew to configure and run your own install. The HomeBrew method is recommended for developing with PostgreSQL (TODO).
-
brew install homebrew/php/php70 homebrew/php/php70-tidy homebrew/php/php70-xdebug
For QGIS Python:
- 'brew install python qt pyqt'
- 'pip install pep8 autopep8 jedi pb_tool '
TODO
- xdebug setup
- apache / php /mysql / mamp
- linter/fixer rulesets
Debian Jessie
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install build-essential git nodejs php-codesniffer php5-intl libsodium13 curl -sS https://getcomposer.org/installer -o composer-setup.php php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Install
git clone git@github.com:lparchaeology/ark2.git cd ark2/ composer install <may need github token...> cd build ./build env:install <build frontend if needed> cd ../bin ./sysadmin site:create <site> <fix database load!> cd .. ln -s sites/<site>/web /Applications/MAMP/htdocs/<site> http://localhost:8888/<site>