Skip to content

Commit 47ac179

Browse files
committed
feat: Add editorconfig
1 parent 30ab86e commit 47ac179

File tree

8 files changed

+26
-13
lines changed

8 files changed

+26
-13
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*]
2+
charset = utf-8
3+
end_of_line = lf
4+
indent_size = 2
5+
indent_style = space
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true

.github/workflows/npm-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ on:
77
branches: [main]
88

99
jobs:
10-
build:
10+
npm-build:
1111
runs-on: ubuntu-latest
12-
12+
1313
strategy:
1414
matrix:
1515
node-version: [24.x]
16-
16+
1717
steps:
1818
- name: Checkout code
1919
uses: actions/checkout@v5
20-
20+
2121
- name: Setup Node.js ${{ matrix.node-version }}
2222
uses: actions/setup-node@v4
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
cache: 'npm'
26-
26+
2727
- name: Install dependencies
2828
run: npm ci
29-
29+
3030
- name: Run tests
3131
run: npm test

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,30 @@ on:
33
release:
44
types: [published]
55
jobs:
6-
build-and-publish:
6+
npm-publish:
77
environment:
88
name: npm-bmssp
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [24.x]
1013
permissions:
1114
contents: read
1215
id-token: write
1316
steps:
1417
- name: Checkout code
1518
uses: actions/checkout@v5
19+
1620
- name: Setup Node.js ${{ matrix.node-version }}
1721
uses: actions/setup-node@v4
1822
with:
1923
node-version: ${{ matrix.node-version }}
2024
cache: 'npm'
2125
registry-url: 'https://registry.npmjs.org'
26+
2227
- name: Install dependencies
2328
run: npm ci
29+
2430
- name: Publish package
2531
run: npm publish --provenance --access public
2632
env:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@ vite.config.ts.timestamp-*
145145
*.swp
146146
*~
147147
.DS_Store
148-
Thumbs.db
148+
Thumbs.db

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ RUN npm install
1010
VOLUME ["src/", "tests/"]
1111

1212
# Default command (can be overridden)
13-
CMD ["node", "tests/main.js"]
13+
CMD ["node", "tests/main.js"]

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ <h1>Tsinghua SSSP - BMSSP JS</h1>
7272
Implementation of the Single Source Shortest Path (SSSP) algorithm - Bounded Multiple Source Shortest Paths (BMSSP), originally published by Tsinghua University's research.
7373
</p>
7474
<p>
75-
Read the original paper:
75+
Read the original paper:
7676
<a href="https://dl.acm.org/doi/10.1145/3717823.3718179" target="_blank">
7777
Tsinghua SSSP Paper
7878
</a>
@@ -93,4 +93,4 @@ <h1>Tsinghua SSSP - BMSSP JS</h1>
9393
<a class="btn" href="https://github.com/sirivasv/tsinghua-sssp" target="_blank">View on GitHub</a>
9494
</div>
9595
</body>
96-
</html></svg>
96+
</html></svg>

src/bmssp.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ function printMessage(message) {
22
console.log(message);
33
}
44

5-
export { printMessage };
5+
export { printMessage };

test/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ function testFunction() {
99
}
1010
}
1111

12-
testFunction();
12+
testFunction();

0 commit comments

Comments
 (0)