0.2.9 • Published 2 years ago

@factorial/stack-twig v0.2.9

Weekly downloads
127
License
MIT
Repository
github
Last release
2 years 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

2 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.2

5 years ago

0.1.3

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago