Skip to content

Commit

Permalink
only open locally
Browse files Browse the repository at this point in the history
  • Loading branch information
airtonix committed Jun 19, 2024
1 parent 28b8da4 commit feea487
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
Binary file modified .yarn/install-state.gz
Binary file not shown.
6 changes: 5 additions & 1 deletion e2e/produces-rendered-svg.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import puppeteer from 'puppeteer';
import fs from 'fs/promises';
import { unified } from 'unified';
import remarkParse from 'remark-parse';
import { remarkNomnoml } from '../dist/remark-nomnoml';
import remarkStringify from 'remark-stringify';
import http from 'node:http';
import open from 'open';
import { remarkNomnoml } from '../dist/remark-nomnoml';
import isCi from 'is-ci';

const processor = unified()
.use(remarkParse)
Expand All @@ -32,6 +33,9 @@ http
.listen(3000, async () => {
console.log('Server listening on http://localhost:3000');
await test();
if (!isCi) {
await open('http://localhost:3000');
}
process.exit(0);
});

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@swc/core": "^1.6.1",
"@types/is-ci": "^3",
"@types/mock-fs": "^4.13.4",
"@types/node": "18.16.9",
"@typescript-eslint/eslint-plugin": "^7.13.1",
Expand All @@ -28,6 +29,7 @@
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.10",
"inject-markdown": "^3.0.0",
"is-ci": "^3.0.1",
"jsonc-eslint-parser": "^2.4.0",
"lint-staged": "^15.2.7",
"open": "^10.1.0",
Expand Down
29 changes: 29 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,15 @@ __metadata:
languageName: node
linkType: hard

"@types/is-ci@npm:^3":
version: 3.0.4
resolution: "@types/is-ci@npm:3.0.4"
dependencies:
ci-info: "npm:^3.1.0"
checksum: 5cb58dd3b64830bf2ce577017f554139cd35e3250a3feb3c2d5e5a2cb261cca909cf68faab6f31dde0c054719c7b360dd0f46d3a83a05b1e78453a9872d056c5
languageName: node
linkType: hard

"@types/json5@npm:^0.0.29":
version: 0.0.29
resolution: "@types/json5@npm:0.0.29"
Expand Down Expand Up @@ -1078,6 +1087,7 @@ __metadata:
dependencies:
"@arethetypeswrong/cli": "npm:^0.15.3"
"@swc/core": "npm:^1.6.1"
"@types/is-ci": "npm:^3"
"@types/mock-fs": "npm:^4.13.4"
"@types/node": "npm:18.16.9"
"@typescript-eslint/eslint-plugin": "npm:^7.13.1"
Expand All @@ -1094,6 +1104,7 @@ __metadata:
hastscript: "npm:^9.0.0"
husky: "npm:^9.0.10"
inject-markdown: "npm:^3.0.0"
is-ci: "npm:^3.0.1"
jsonc-eslint-parser: "npm:^2.4.0"
lint-staged: "npm:^15.2.7"
mdast: "npm:3.0.0"
Expand Down Expand Up @@ -1733,6 +1744,13 @@ __metadata:
languageName: node
linkType: hard

"ci-info@npm:^3.1.0, ci-info@npm:^3.2.0":
version: 3.9.0
resolution: "ci-info@npm:3.9.0"
checksum: 75bc67902b4d1c7b435497adeb91598f6d52a3389398e44294f6601b20cfef32cf2176f7be0eb961d9e085bb333a8a5cae121cb22f81cf238ae7f58eb80e9397
languageName: node
linkType: hard

"clean-stack@npm:^2.0.0":
version: 2.2.0
resolution: "clean-stack@npm:2.2.0"
Expand Down Expand Up @@ -3717,6 +3735,17 @@ __metadata:
languageName: node
linkType: hard

"is-ci@npm:^3.0.1":
version: 3.0.1
resolution: "is-ci@npm:3.0.1"
dependencies:
ci-info: "npm:^3.2.0"
bin:
is-ci: bin.js
checksum: 192c66dc7826d58f803ecae624860dccf1899fc1f3ac5505284c0a5cf5f889046ffeb958fa651e5725d5705c5bcb14f055b79150ea5fcad7456a9569de60260e
languageName: node
linkType: hard

"is-core-module@npm:^2.11.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.13.1":
version: 2.13.1
resolution: "is-core-module@npm:2.13.1"
Expand Down

0 comments on commit feea487

Please sign in to comment.