Coder Social home page Coder Social logo

tollwerk / fractal-typo3 Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 1.0 555 KB

TYPO3 bridge for the Fractal component library tool (http://fractal.build / @frctl)

Home Page: https://github.com/tollwerk/fractal-typo3

License: MIT License

JavaScript 82.32% Shell 17.68%
components styleguide typo3 typo3-cms typo3-fluid typo3-cms-extension fractal design-systems design-system

fractal-typo3's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

zeroseven

fractal-typo3's Issues

Add support for different file types than t3s

There are two configuration options where I can choose a file type for the preview templates:

  1. In fractal.js I can set: fractal.components.set('ext', '.hbs');
  2. In my PHP Component I can override the $extension variable from AbstractComponent.php.

But this breaks the fractal preview as the preview file type is hardcoded to .t3s:

writeFile(path.join(componentParent, `_${componentName}-preview.t3s`), component.preview);

I would recommend to use the component extension variable in this line:

writeFile(path.join(componentParent, `_${componentName}-preview.${component.extension}`), component.preview);

Top-level components yields Fractal preview template error

When a component is defined at the top level (i.e. directly in the Vendor\ExtensionName\Component namespace), the path exported to Fractal is just ".". The bridge then creates a wrong preview template name starting with "@-" (there must not be the dash at the beginning).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.