Skip to content

Commit

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

* Github action

* Fix build

* Fix build

* Fix build

* prepublishOnly
  • Loading branch information
joeldenning authored Jan 21, 2021
1 parent fb83326 commit ca53d06
Show file tree
Hide file tree
Showing 14 changed files with 6,309 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "ts-important-stuff",
"parser": "babel-eslint"
}
23 changes: 23 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Node.js CI

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "15"
- uses: pnpm/action-setup@v1.2.1
with:
version: 5.14.1
- run: pnpm install --frozen-lockfile
- run: pnpm test
- run: pnpm run build
- run: pnpm run check-format
- run: pnpm run lint
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ dist

# TernJS port file
.tern-port

lib
.DS_Store
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage
lib
pnpm-lock.yaml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# single-spa-css

Lifecycle helpers for loading and unmounting css
7 changes: 7 additions & 0 deletions babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This config is only used in tests, not when building
module.exports = {
presets: [
["@babel/preset-env", { targets: { node: "current" } }],
"@babel/preset-typescript",
],
};
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
setupFilesAfterEnv: ["<rootDir>/src/jest-setup.js"],
};
62 changes: 62 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "single-spa-css",
"version": "1.0.0",
"description": "Lifecycle helpers for loading CSS",
"type": "module",
"main": "lib/esm/single-spa-css.min.js",
"types": "lib/types/single-spa-css.d.ts",
"scripts": {
"test": "jest",
"clean": "rimraf lib",
"build": "pnpm run clean && concurrently pnpm:build:*",
"prepublishOnly": "pnpm run build",
"check-format": "prettier --check .",
"build:code": "rollup -c",
"build:types": "tsc",
"format": "prettier --write .",
"lint": "eslint src --ext ts"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged && concurrently pnpm:lint pnpm:test"
}
},
"files": [
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/single-spa/single-spa-css.git"
},
"author": "Joel Denning",
"license": "MIT",
"bugs": {
"url": "https://github.com/single-spa/single-spa-css/issues"
},
"homepage": "https://github.com/single-spa/single-spa-css#readme",
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@rollup/plugin-typescript": "^8.1.0",
"@testing-library/dom": "^7.29.4",
"@testing-library/jest-dom": "^5.11.9",
"@types/jest": "^26.0.20",
"babel-eslint": "^11.0.0-beta.2",
"babel-jest": "^26.6.3",
"concurrently": "^5.3.0",
"eslint": "^7.18.0",
"eslint-config-ts-important-stuff": "^1.1.0",
"husky": "^4.3.8",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"rimraf": "^3.0.2",
"rollup": "^2.37.1",
"rollup-plugin-terser": "^7.0.2",
"single-spa": "^5.9.0",
"tslib": "^2.1.0",
"typescript": "^4.1.3"
}
}
Loading

0 comments on commit ca53d06

Please sign in to comment.