Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ninsuo/twigfiddle
twigfiddle.com provides a small development environment to develop, run, store and access Twig code online.
https://github.com/ninsuo/twigfiddle
fiddle twig
Last synced: 3 months ago
JSON representation
twigfiddle.com provides a small development environment to develop, run, store and access Twig code online.
- Host: GitHub
- URL: https://github.com/ninsuo/twigfiddle
- Owner: ninsuo
- License: mit
- Created: 2014-07-31T07:32:30.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-11-22T07:43:13.000Z (7 months ago)
- Last Synced: 2024-01-16T12:21:13.916Z (5 months ago)
- Topics: fiddle, twig
- Language: JavaScript
- Homepage: https://twigfiddle.com
- Size: 48.7 MB
- Stars: 134
- Watchers: 6
- Forks: 14
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-stars - ninsuo/twigfiddle - twigfiddle.com provides a small development environment to develop, run, store and access Twig code online. (JavaScript)
README
# Welcome
This is the project's repository, come here if you found a bug, if you want to request new features or if you want to contribute.
If you need help to use twigfiddle, please read the twigfiddle's [help page](https://twigfiddle.com/about).
# Some words about the project
The project is made of 2 applications:
- cli directory contains the fiddle runner, an application built using Symfony components to execute a fiddle.
- web directory contains the web application, built using the Symfony framework
About the other directories:
- resources directory contains specification documentations, logo source and original integrated design.
- samples contains exported fiddles (see app/console custom commands)
- environment is the default directory containing fiddles at runtime
- debug is the default directory where crashed fiddles are stored
# Installation
Here are instructions to get started with the application.
Of course, replace paths to fit with your own environment.```sh
# Clone the project
git clone https://github.com/ninsuo/twigfiddle.git twigfiddle
cd twigfiddle# install Composer
php -r "readfile('https://getcomposer.org/installer');" | php
sudo mv composer.phar /usr/bin/composer
sudo chmod 755 /usr/bin/composer# Install the fiddle runner and prepare all twig versions
cd cli
composer install
cd twig
sh prepare.sh
cd ../../# Install the web application
# composer update will fail when trying to remove apc cache, that's normal at this step
cd web
composer install# Install the database
# You should create it yourself, from mysql, type:
# CREATE DATABASE twigfiddle
# GRANT ALL PRIVILEGES ON twigfiddle.* To ''@'127.0.0.1' IDENTIFIED BY '';
php app/console doctrine:schema:drop --force
php app/console doctrine:schema:create
php app/console twigfiddle:import ../samples/*# Check that everything is working properly
composer update
php app/check.php
phpunit tests# Launch the application
php app/console server:start
open http://127.0.0.1:8000/hello
```# Automatically download, install and configure new Twig releases
Simply run the following command:
```sh
php cli/run-prod.php twigfiddle:release:watcher
```# Upgrade for installs before 01/11/2016
User provider have been refactored ( see #18 ), you need to run the following queries to upgrade twigfiddle schema.
```sql
alter table user add column nickname varchar(255) not null after username;
update user set nickname = username;
update user set username = concat('["', resource_owner, '","', resource_owner_id, '"]');
```# Configure external services
Don't panic, that's optional.
- Google Login: https://console.developers.google.com/project
- Facebook Login: https://developers.facebook.com/apps/
- Twitter Login: https://apps.twitter.com/
- SensioLabs Connect Login: https://connect.sensiolabs.com/account/apps
- GitHub Login: https://github.com/settings/developers
- reCaptcha: https://www.google.com/recaptcha/admin
- Google Analytics: https://www.google.com/analytics/web/