Skip to content

Commit d9a43db

Browse files
committed
Feat: add esm
1 parent 2dc323b commit d9a43db

19 files changed

+5046
-6916
lines changed

.babelrc

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

.eslintrc.js

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

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Node.js CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
strategy:
11+
matrix:
12+
node: [18.x, 20.x, 22.x]
13+
os: [ubuntu-latest, windows-latest]
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Use Node.js ${{ matrix.node }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node }}
21+
- run: npm install
22+
- run: npm run test
23+
- run: npm run lint
24+
- run: npm run prettier:check
25+
if: matrix.os != 'windows-latest'
26+
- name: Coveralls Parallel
27+
uses: coverallsapp/github-action@master
28+
with:
29+
github-token: ${{ secrets.github_token }}
30+
flag-name: run ${{ join(matrix.*, ' - ') }}
31+
parallel: true
32+
finish:
33+
runs-on: ubuntu-latest
34+
needs: test
35+
steps:
36+
- name: Coveralls
37+
uses: coverallsapp/github-action@master
38+
with:
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
40+
parallel-finished: true

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules
22
npm-debug.log
33
coverage
4-
dest

.npmignore

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

.travis.yml

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

CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
2.0.0 - July, 23 2020
22

3-
* cc8789d Docs: master -> main (JPeer264)
4-
* c3e70b1 Docs: update badges (JPeer264)
5-
* 891136f Feat: update dependencies | TS support | drop node lower v10 (JPeer264)
6-
3+
- cc8789d Docs: master -> main (JPeer264)
4+
- c3e70b1 Docs: update badges (JPeer264)
5+
- 891136f Feat: update dependencies | TS support | drop node lower v10 (JPeer264)

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# is-git-repository
22

3-
[![Build Status](https://travis-ci.com/JPeer264/node-is-git-repository.svg?branch=main)](https://travis-ci.com/JPeer264/node-is-git-repository)
4-
[![Build status](https://ci.appveyor.com/api/projects/status/candvk0h292r03q2?svg=true)](https://ci.appveyor.com/project/JPeer264/node-is-git-repository)
3+
[![Build Status](https://img.shields.io/github/actions/workflow/status/JPeer264/node-is-git-repository/ci.yml?branch=main)](https://github.com/JPeer264/node-is-git-repository/actions/workflows/ci.yml?query=branch%3Amain)
54
[![Coverage Status](https://coveralls.io/repos/github/JPeer264/node-is-git-repository/badge.svg?branch=main)](https://coveralls.io/github/JPeer264/node-is-git-repository?branch=main)
65

76
Checks synchronously if a specific directory is a git repository
@@ -11,18 +10,14 @@ Checks synchronously if a specific directory is a git repository
1110
```sh
1211
$ npm i is-git-repository --save
1312
```
14-
or
15-
```sh
16-
$ yarn add is-git-repository
17-
```
1813

1914
## Usage
2015

2116
```js
22-
const isGit = require('is-git-repository');
17+
import isGit from "is-git-repository";
2318

2419
isGit(); // true or false of process.cwd()
25-
isGit('any/git/repo'); // true or false
20+
isGit("any/git/repo"); // true or false
2621
```
2722

2823
## LICENSE

appveyor.yml

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

eslint.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import pluginJs from "@eslint/js";
2+
import eslintConfigPrettier from "eslint-config-prettier";
3+
4+
/** @type {import('eslint').Linter.Config[]} */
5+
export default [pluginJs.configs.recommended, eslintConfigPrettier];

0 commit comments

Comments
 (0)