0.2.9 • Published 1 year ago

@factorial/stack-twig v0.2.9

Weekly downloads
127
License
MIT
Repository
github
Last release
1 year ago

@factorial/stack-twig

This is the Twig plugin for @factorial/stack-core.

It adds a lint task using https://github.com/friendsoftwig/twigcs and https://github.com/factorial-io/twigcs-extension.

Installation

You can install it via:

yarn factorial init

or manually via:

yarn add @factorial/stack-twig

Make sure it is added to your .factorialrc.js like this:

// .factorialrc.js

module.exports = {
  use: [require("@factorial/stack-twig")],
};

Installing the twigcs-extension

If factorial-io/twigcs-extension is already added to the composer.json

composer install

If factorial-io/twigcs-extension is not added yet to the composer.json

composer require --dev factorial-io/twigcs-extension

Options

executable

If you cannot install the twigcs-extension inside ./vendor, but only somewhere else, you can point to the executable like this:

// .factorialrc.js

module.exports = {
  use: [
    [
      require("@factorial/stack-twig"),
      {
        executable: "path/to/the/executable",
      },
    ],
  ],
};

folder

By default, twigcs will lint all twig files in your rootFolder. If you do not want that, you can pass folder to this package:

// .factorialrc.js

module.exports = {
  use: [
    [
      require("@factorial/stack-twig"),
      {
        folder: "path/to/templates",
      },
    ],
  ],
};

Using twigcs with VS Code

If you are using VS Code, you can use Twigcs Linter. Make sure to use the same executable by setting ./vendor/bin/twigcs in twigcs.executablePath.

0.2.9

1 year ago

0.2.8

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago