Skip to content

Commit

Permalink
🔨 Include Carbon.FileContent
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Nov 2, 2017
1 parent 0845300 commit e24eccf
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 91 deletions.
61 changes: 0 additions & 61 deletions Classes/Fusion/FileContentImplementation.php

This file was deleted.

6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,9 @@ This prototype generate your `script` and `style` tags from the certain setting
### [Carbon.IncludeAssets:File](Resources/Private/Fusion/External/File.fusion)
The heart of this package. This prototype generates a `script` or `style` tag. You can pass a `file` (without the path) or the complete `path`. Be aware that you can also pass the attributes like described on top. To force a type you can write `(js)` or `(css)` at the end of `path` or `file`.

### [Carbon.IncludeAssets:FileContent](Resources/Private/Fusion/External/FileContent.fusion)
This prototype read a file from a `path` or `resource`. Used for including the files inline.

### [Carbon.IncludeAssets:GoogleFonts](Resources/Private/Fusion/External/GoogleFonts.fusion)
You can set the property `fonts` e.g. `Lato|Open+Sans:400,700` and the `script` tag get generated. Per default, this prototype read the [Settings.yaml](Configuration/Settings.yaml).

### [Carbon.IncludeAssets:HashOfFile](Resources/Private/Fusion/External/HashOfFile.fusion)
This prototype read a file from a `path` or `resource` and return a md5 based string.

Installation
------------
Most of the time you have to make small adjustments to a package (e.g., the configuration in `Settings.yaml`). Because of that, it is important to add the corresponding package to the composer from your theme package. Mostly this is the site packages located under `Packages/Sites/`. To install it correctly go to your theme package (e.g.`Packages/Sites/Foo.Bar`) and run following command:
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Fusion/External/File.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ prototype(Carbon.IncludeAssets:File) < prototype(Neos.Fusion:Case) {

isInternal {
condition = ${attributes == 'inline' ? true : false}
renderer = Carbon.IncludeAssets:FileContent {
renderer = Carbon.FileContent:FileContent {
path = ${path}
@process.wrapWithTag = Carbon.IncludeAssets:TypeCase {
isCSS.renderer = ${'<style>' + value + '</style>'}
Expand Down
5 changes: 0 additions & 5 deletions Resources/Private/Fusion/External/FileContent.fusion

This file was deleted.

16 changes: 0 additions & 16 deletions Resources/Private/Fusion/External/HashOfFile.fusion

This file was deleted.

2 changes: 1 addition & 1 deletion Resources/Private/Fusion/Internal/VersionOfAsset.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ prototype(Carbon.IncludeAssets:VersionOfAsset) < prototype(Neos.Fusion:Value) {

@context.path = ${this.path}

hash = Carbon.IncludeAssets:HashOfFile {
hash = Carbon.FileContent:HashOfFile {
path = ${path}
}

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Include your assets (css, js) in an easy way into Neos",
"license": "MIT",
"require": {
"neos/neos": "~3.0 || dev-master"
"neos/neos": "~3.0 || dev-master",
"carbon/filecontent": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit e24eccf

Please sign in to comment.