Skip to content

Commit

Permalink
feat: vendorize
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Nov 16, 2022
1 parent b3fd7a9 commit 42fc4a3
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 42 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# For more information about the properties used in this file,
# please see the EditorConfig documentation:
# http://editorconfig.org

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yml,js,json,css,scss,eslintrc}]
indent_size = 2
indent_style = space

[composer.json]
indent_size = 4

# The indent size used in the package.json file cannot be changed:
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

A library with common functionality used by SilverStripe template developers.

Thi smodule is now SilverStripe 4 compatible

For a SilverStripe `3.*` compatible version see branch `0.2`.
For a SilverStripe `2.4` compatible version see branch `0.1`.

# Installation (with composer)

$ composer require heyday/silverstripe-templatehelpers
Expand All @@ -29,4 +24,4 @@ The image path helper defaults to `themes/[theme]/images/`. The path within the
TemplateHelpers:
dev_images: source/images
prod_images: production/images
```
```
1 change: 0 additions & 1 deletion _config.php

This file was deleted.

23 changes: 11 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"name": "heyday/silverstripe-templatehelpers",
"type": "silverstripe-module",
"description": "Simple template functionality for Silverstripe",
"authors": [
{
"name": "Stevie Mayhew",
"email": "[email protected]"
}
],
"require": {
"composer/installers": "~1.0"
}
"name": "heyday/silverstripe-templatehelpers",
"type": "silverstripe-vendormodule",
"description": "Simple template functionality for Silverstripe",
"require": {
"composer/installers": "~1.0"
},
"autoload": {
"psr-4": {
"Heyday\\TemplateHelpers\\": "src/"
}
},
}
8 changes: 4 additions & 4 deletions code/TemplateHelpers.php → src/TemplateHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@
*/
class TemplateHelpers implements TemplateGlobalProvider
{
private static $casting = array(
private static $casting = [
'MetaTags' => 'HTMLText',
'addInlineScript' => 'HTMLText'
);
];

/**
* @return array
*/
public static function get_template_global_variables()
{
return array(
return [
'isDev',
'isTest',
'isLive',
'addInlineScript',
'ThemeDir',
'ImagePath'
);
];
}

/**
Expand Down
10 changes: 0 additions & 10 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit 42fc4a3

Please sign in to comment.