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
# This function takes the output of the last command and exits if it failed. | |
earlyexit() { | |
CODE="$?" | |
if [ "${CODE}" != "0" ]; then | |
echo --- | |
echo Exiting on failure... | |
echo --- | |
exit 1 | |
fi | |
echo Script succeeded. |
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
# Install a site. | |
$HOME/.composer/vendor/bin/drush si --db-url=mysql://backdrop:backdrop@127.0.0.1/backdrop -y | |
# Boot up the server. | |
$HOME/.composer/vendor/bin/drush backdrop-runserver 127.0.0.1:8057 > /dev/null 2>&1 | |
# Enable a module. | |
$HOME/.composer/vendor/bin/drush en ${MODULE_NAME} -y |
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
default: | |
# Ignore certain tags so they don't have to be excluded on the commandline. | |
gherkin: | |
filters: | |
tags: "~@broken" | |
# Not sure if this is the best, but it sounds nice. | |
formatters: | |
pretty: true | |
suites: | |
my_suite: |
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
{ | |
"require": { | |
"behat/mink-extension": "~2.3", | |
"behat/mink-goutte-driver": "~1.2", | |
"behat/mink-selenium2-driver": "~1.3" | |
}, | |
"minimum-stability": "dev", | |
"prefer-stable": true, | |
"config": { | |
"bin-dir": "bin/" |
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
<?php | |
/** | |
* Implements hook_page_alter(). | |
*/ | |
function code_syntax_highlighting_bundle_page_alter() { | |
// Add the JS and CSS assets if the page is supposed to have code syntax highlighting. | |
$current_object = menu_get_object(); | |
if (in_array($current_object->type, config_get('code_syntax_highlighting_bundle.settings','csh_enabled_node_types'), TRUE)) { | |
backdrop_add_css(backdrop_get_path('module', 'code_syntax_highlighting_bundle') | |
. '/libraries/highlightjs/styles/' . config_get('code_syntax_highlighting_bundle.settings','csh_theme') . '.css'); |
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
(function ($, Backdrop, CKEDITOR) { | |
"use strict"; | |
CKEDITOR.plugins.add('csh', { | |
init: function (editor) { | |
editor.addCommand('csh_command', new CKEDITOR.dialogCommand('code_sc_generatorDialog')); | |
if (editor.ui.addButton) { | |
editor.ui.addButton('CSH', { |
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
(function ($) { | |
CKEDITOR.plugins.add('code_sc', { | |
// more code... | |
})(jQuery); |
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
<?php | |
/** | |
* Implements of hook_wysiwyg_plugin(). | |
*/ | |
function code_syntax_highlighting_bundle_wysiwyg_plugin($editor, $version) { | |
// Add the code button for the ckeditor. | |
if ($editor === 'ckeditor') { | |
return array( | |
'code_sc' => array( |
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
name: express | |
recipe: drupal7 | |
config: | |
webroot: web | |
xdebug: true | |
php: "7.1" | |
conf: | |
php: config/php/zzzzzz-express-custom.ini | |
#database: config/mysql/.my.cnf | |
services: |
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
# Run JS tests if merging PR into dev or has JS in it. | |
if [ "${TRAVIS_EVENT_TYPE}" == "push" ] || [ "${EXPRESS_COMMIT_HAS_JS}" ]; then | |
echo "Running Express JS tests..." | |
${ROOT_DIR}/drupal/profiles/express/tests/behat/bin/behat --stop-on-failure --strict --config ${ROOT_DIR}/drupal/profiles/express/tests/behat/behat.travis.yml --verbose --tags ${EXPRESS_JS_BEHAT_TAGS} | |
earlyexit | |
else | |
echo "Not Running Express JS tests..." | |
fi |