Skip to content

Commit bfe90ff

Browse files
author
Kristján Oddsson
authored
Initial commit
0 parents  commit bfe90ff

File tree

7 files changed

+138
-0
lines changed

7 files changed

+138
-0
lines changed

.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: modernweb-dev
2+
open_collective: modern-web

.github/dependabot.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
day: "thursday"

.github/workflows/lint.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on: pull_request
4+
5+
env:
6+
FORCE_COLOR: true
7+
8+
jobs:
9+
linux:
10+
timeout-minutes: 30
11+
name: Linux
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Node 20
18+
uses: actions/setup-node@v4
19+
env:
20+
FORCE_COLOR: 0
21+
with:
22+
node-version: 20
23+
cache: npm
24+
25+
- name: Install Dependencies
26+
run: npm ci
27+
28+
- name: Lint
29+
run: npm run lint

.github/workflows/release.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 20
15+
registry-url: https://registry.npmjs.org/
16+
cache: npm
17+
- run: npm ci
18+
- run: npm test
19+
- run: npm run build --if-present
20+
- run: npm version ${TAG_NAME} --git-tag-version=false
21+
env:
22+
TAG_NAME: ${{ github.event.release.tag_name }}
23+
- run: npm whoami; npm --ignore-scripts publish
24+
env:
25+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/verify-node.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Node tests
2+
3+
on: pull_request
4+
5+
env:
6+
FORCE_COLOR: true
7+
8+
jobs:
9+
verify-linux:
10+
timeout-minutes: 30
11+
name: Linux
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
node-version:
16+
- '18'
17+
- '20'
18+
- 'latest'
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup Node ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
env:
26+
FORCE_COLOR: 0
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: npm
30+
31+
- name: Install Dependencies
32+
run: npm ci
33+
34+
- name: Build packages
35+
run: npm run build --if-present
36+
37+
- name: Test
38+
run: npm run test
39+
40+
verify-windows:
41+
timeout-minutes: 30
42+
name: Windows
43+
runs-on: windows-2022
44+
steps:
45+
- name: Set git to use LF
46+
run: |
47+
git config --global core.autocrlf false
48+
git config --global core.eol lf
49+
50+
- uses: actions/checkout@v4
51+
52+
- name: Setup Node '20'
53+
uses: actions/setup-node@v4
54+
env:
55+
FORCE_COLOR: 0
56+
with:
57+
node-version: '20'
58+
cache: 'npm'
59+
60+
- name: Install Dependencies
61+
run: npm ci
62+
63+
- name: Build
64+
run: npm run build --if-present
65+
66+
- name: Test
67+
run: npm run test

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# package-template
2+
A template for Modern Web packages

0 commit comments

Comments
 (0)