Skip to content

Commit

Permalink
Initial implementation (#1)
Browse files Browse the repository at this point in the history
* Initial implementation

* Update workflow

* Specify packageManager

* Fix build

* Switch to ts-jest
  • Loading branch information
joeldenning authored Oct 17, 2024
1 parent 095e8a2 commit a5cdcc7
Show file tree
Hide file tree
Showing 14 changed files with 3,997 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [joeldenning]
patreon: # Replace with a single Patreon username
open_collective: single-spa
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
33 changes: 33 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build, Test, Release

on:
push:
branches: main
pull_request:
branches: "*"

jobs:
build_test:
name: Build and Test
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install Pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Test
run: |
pnpm run check-format
pnpm run test
- name: Build
run: pnpm run build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

lib
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm pretty-quick --staged
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# import-map-microfrontend-utils

Utility types and functions for import-map-microfrontend related projects
13 changes: 13 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
"@babel/preset-typescript"
]
}
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
export default {
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest", {}],
},
};
41 changes: 41 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "import-map-microfrontend-utils",
"version": "1.0.0",
"description": "Utility types and functions for import-map-microfrontend projects",
"type": "module",
"exports": {
".": {
"default": "./lib/import-map-microfrontend-utils.js",
"types": "./lib/import-map-microfrontend-utils.d.ts"
}
},
"scripts": {
"clean": "rimraf lib",
"build": "pnpm clean && tsc",
"check-format": "prettier --check .",
"format": "prettier --write .",
"test": "jest",
"prepare": "husky"
},
"keywords": [
"single-spa"
],
"files": [
"lib"
],
"author": "Joel Denning",
"license": "MIT",
"devDependencies": {
"@jest/globals": "^29.7.0",
"@types/jest": "^29.5.13",
"husky": "^9.1.6",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"rimraf": "^6.0.1",
"ts-jest": "^29.2.5",
"typescript": "^5.6.3"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit a5cdcc7

Please sign in to comment.