@11ty/eleventy-plugin-webc 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,14 +26,25 @@ module.exports = function(eleventyConfig, options = {}) {
26
26
  options.filters = filters;
27
27
 
28
28
  if(options.components) {
29
- eleventyConfig.addWatchTarget(options.components);
29
+ let components = options.components;
30
+ if(!Array.isArray(components)) {
31
+ components = [components];
32
+ }
30
33
 
31
- // Opt-out of Eleventy to process components
32
- // Note that Eleventy’s default ignores already have _includes/**
34
+ for(let entry of components) {
35
+ if(entry.startsWith("npm:")) {
36
+ continue;
37
+ }
33
38
 
34
- // This will cause component files outside of _includes to not be watched: https://github.com/11ty/eleventy-plugin-webc/issues/29
35
- // Fixed in @11ty/eleventy@2.0.0-canary.18: https://github.com/11ty/eleventy/issues/893
36
- eleventyConfig.ignores.add(options.components);
39
+ eleventyConfig.addWatchTarget(entry);
40
+
41
+ // Opt-out of Eleventy to process components
42
+ // Note that Eleventy’s default ignores already have _includes/**
43
+
44
+ // This will cause component files outside of _includes to not be watched: https://github.com/11ty/eleventy-plugin-webc/issues/29
45
+ // Fixed in @11ty/eleventy@2.0.0-canary.18: https://github.com/11ty/eleventy/issues/893
46
+ eleventyConfig.ignores.add(entry);
47
+ }
37
48
  }
38
49
 
39
50
  // TODO Remove this when @11ty/eleventy-plugin-bundle is moved to core.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@11ty/eleventy-plugin-webc",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "WebC support for Eleventy adds for Single File Web Components",
5
5
  "main": "eleventyWebcPlugin.js",
6
6
  "scripts": {
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@11ty/eleventy": "^2.0.0",
46
- "@11ty/eleventy-plugin-bundle": "^1.0.1",
47
- "@11ty/webc": "^0.9.0"
46
+ "@11ty/eleventy-plugin-bundle": "^1.0.3",
47
+ "@11ty/webc": "^0.9.1"
48
48
  },
49
49
  "devDependencies": {
50
50
  "ava": "^5.2.0",
package/.editorconfig DELETED
@@ -1,15 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = tab
5
- indent_size = 2
6
- end_of_line = lf
7
- insert_final_newline = false
8
- trim_trailing_whitespace = true
9
- charset = utf-8
10
-
11
- [*.js]
12
- insert_final_newline = true
13
-
14
- [test/*.js]
15
- trim_trailing_whitespace = false
@@ -1,20 +0,0 @@
1
- on: push
2
- jobs:
3
- build:
4
- runs-on: ${{ matrix.os }}
5
- strategy:
6
- matrix:
7
- os: ["ubuntu-latest", "macos-latest", "windows-latest"]
8
- node: ["14", "16", "18"]
9
- name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
10
- steps:
11
- - uses: actions/checkout@v3
12
- - name: Setup node
13
- uses: actions/setup-node@v3
14
- with:
15
- node-version: ${{ matrix.node }}
16
- # cache: npm
17
- - run: npm install
18
- - run: npm test
19
- env:
20
- YARN_GPG: no