Skip to content

Commit 32533ac

Browse files
authored
Merge pull request #4 from saneef/feat/async
feat/async
2 parents 556fd39 + 7849f3d commit 32533ac

22 files changed

Lines changed: 341 additions & 157 deletions

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ insert_final_newline = false
88
trim_trailing_whitespace = true
99
charset = utf-8
1010

11-
[*.js]
12-
insert_final_newline = true
11+
[*.{js,md}]
12+
insert_final_newline = true

.eleventy.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on:
2+
push:
3+
branches-ignore:
4+
- "gh-pages"
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
11+
node: ["18", "22"]
12+
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
- name: Setup node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: ${{ matrix.node }}
22+
- run: npm install
23+
- run: npm run lint
24+
- run: npm test
25+
env:
26+
YARN_GPG: no

.husky/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.husky/pre-commit

Lines changed: 0 additions & 5 deletions
This file was deleted.

.npmignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
.editorconfig
22
.eslintcache
3-
.eslintrc.js
43
.github/
5-
.husky/pre-commit
64
.nyc_output
5+
.gitattributes
6+
eslint.config.js
77
tests
8-
.travis.yml
9-
.gitattributes
8+
prettier.config.js
9+
lefthook.yml
10+
ava.config.js

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ This Eleventy plugin provides two [template filters](https://www.11ty.dev/docs/f
99

1010
🌏 This plugin is made primarily to populate `<updated>` fields in an RSS feed. Here is [a blog post on how to use this plugin](https://saneef.com/tutorials/fix-dates-on-eleventy-rss-feeds/) with [`eleventy-plugin-rss`](https://www.11ty.dev/docs/plugins/rss/).
1111

12-
⚠️ Getting Git commit date is a bit slow (\~50ms for each path). So, use it sparingly. It's recommended to call this filter within a production flag.
13-
1412
## Usage
1513

1614
### 1. Install
@@ -22,13 +20,13 @@ npm install eleventy-plugin-git-commit-date
2220
### 2. Add to Eleventy config
2321

2422
```js
25-
// .eleventy.js
23+
// eleventy.config.js
2624

27-
const pluginGitCommitDate = require("eleventy-plugin-git-commit-date");
25+
import pluginGitCommitDate from "eleventy-plugin-git-commit-date";
2826

29-
module.exports = function (eleventyConfig) {
27+
export default function (eleventyConfig) {
3028
eleventyConfig.addPlugin(pluginGitCommitDate);
31-
};
29+
}
3230
```
3331

3432
### 3. Use in templates
@@ -59,4 +57,5 @@ Only the last commit is checked out by [GitHub Action Checkout](https://github.c
5957
## Credits
6058

6159
- [@zachleat](https://github.com/11ty/eleventy/issues/142) suggested the use of Git commit dates instead of modified date.
62-
- The code is based on [@vuepress/plugin-last-updated](https://github.com/vuejs/vuepress/tree/master/packages/@vuepress/plugin-last-updated).
60+
- The core code is based on Jens Oliver Meiert' blog post [Eleventy: How to Work Around the “git Last Modified” Performance Bottleneck](https://meiert.com/blog/eleventy-git-last-modified/).
61+
- Pre v1.0 was based on [@vuepress/plugin-last-updated](https://github.com/vuejs/vuepress/tree/master/packages/@vuepress/plugin-last-updated).

ava.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
files: ["tests/**/*", "!tests/utils.js"],
3+
watchMode: {
4+
ignoreChanges: ["tests/output/**"],
5+
},
6+
};

0 commit comments

Comments
 (0)