You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 10, 2019. It is now read-only.
The Tab Plugin allows Pattern Lab Node users to see sibling files next to a pattern in the filesystem, displaying them as additional tabs alongside the template and HTML tabs in both the Style Guide frontend and the single-pattern info modal.
8
+
9
+
## Installation
10
+
11
+
To add the Tab Plugin to your project using [npm](http://npmjs.com/) type:
12
+
13
+
npm install plugin-node-tab --save
14
+
15
+
Or add it directly to your project's `package.json` file and run `npm install`
16
+
17
+
Post installation, the plugin will prompt you for what filetypes you want to add tabs for.
18
+
19
+
```
20
+
$ Specify filetype(s) to create a tab for. Separate multiple filetypes with a space, pipe or comma. Example: js css >>>
21
+
```
22
+
23
+
## Expected Structure
24
+
25
+
With the Tab Plugin installed, you can now accompany pattern template files with the file types of your choice and expect Pattern Lab to show them as tabs. The file structure would be similar to that of `pattern.json` or `pattern.md` files, except that it will be `pattern.<<type>>`.
26
+
27
+
For example, if we added a` css` tab:
28
+
29
+
```
30
+
./_patterns/foo/bar
31
+
├── pattern.mustache (the pattern template)
32
+
├── pattern.md (optional pattern-specific documentation and metadata)
33
+
├── pattern.json (optional pattern-specific data)
34
+
└── pattern.css (the tab you added.)
35
+
```
36
+
37
+
## Enabling / Disabling the Plugin
38
+
39
+
After install, you may manually enable or disable the plugin by removing it from the `patternlab-config.json` file. Installation added a key called `plugin-node-tab` to it. In the future this will be possible via CLI.
0 commit comments