Skip to content

Commit d852b5e

Browse files
The "host-environment" package is now just a wrapper around the scoped "@jsdevtools/host-environment" package
1 parent 92d0fbe commit d852b5e

File tree

5 files changed

+55
-0
lines changed

5 files changed

+55
-0
lines changed

.github/workflows/CI-CD.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,15 @@ jobs:
142142
uses: JS-DevTools/npm-publish@v1
143143
with:
144144
token: ${{ secrets.NPM_TOKEN }}
145+
146+
- name: Prepare the non-scoped packaged
147+
run: |
148+
cp LICENSE *.md dist
149+
VERSION=$(node -e "console.log(require('./package.json').version)")
150+
sed -i "s/X.X.X/${VERSION}/g" dist/package.json
151+
152+
- name: Publish the non-scoped package to NPM
153+
uses: JS-DevTools/npm-publish@v1
154+
with:
155+
token: ${{ secrets.NPM_TOKEN }}
156+
package: dist/package.json

dist/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import host from "@jsdevtools/host-environment";
2+
export * from "@jsdevtools/host-environment";
3+
export default host;

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
module.exports = require("@jsdevtools/host-environment");

dist/index.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import host from "@jsdevtools/host-environment";
2+
export * from "@jsdevtools/host-environment";
3+
export default host;

dist/package.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "host-environment",
3+
"version": "X.X.X",
4+
"description": "Easily detect what host environment your code is running in",
5+
"keywords": [
6+
"host",
7+
"environment",
8+
"browser",
9+
"version",
10+
"user agent",
11+
"universal",
12+
"isomorphic"
13+
],
14+
"author": {
15+
"name": "James Messinger",
16+
"url": "https://jamesmessinger.com"
17+
},
18+
"license": "MIT",
19+
"homepage": "https://jstools.dev/host-environment",
20+
"repository": {
21+
"type": "git",
22+
"url": "https://github.com/JS-DevTools/host-environment.git"
23+
},
24+
"main": "index.js",
25+
"module": "index.mjs",
26+
"types": "index.d.ts",
27+
"files": [
28+
"index.js",
29+
"index.mjs",
30+
"index.d.ts"
31+
],
32+
"dependencies": {
33+
"@jsdevtools/host-environment": "X.X.X"
34+
}
35+
}

0 commit comments

Comments
 (0)