Skip to content

Commit 2d9a258

Browse files
committed
v3.0.0: renamed to scoped npm package @depay/react-shadow-dom
1 parent 3b7c71c commit 2d9a258

File tree

13 files changed

+84
-88
lines changed

13 files changed

+84
-88
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
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:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
# Setup .npmrc file to publish to npm
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: '16.x'
16+
registry-url: 'https://registry.npmjs.org'
17+
- run: npm install
18+
19+
- name: get-npm-version
20+
id: package-version
21+
uses: martinbeentjes/npm-get-version-action@master
22+
23+
- run: npm publish --access public
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@
2020
# Various
2121
npm-debug.log*
2222
yarn-error.log
23+
24+
tmp/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Quick Start
22

33
```
4-
yarn add depay-react-shadow-dom
4+
yarn add @depay/react-shadow-dom
55
```
66

77
```
8-
import { ReactShadowDOM } from 'depay-react-shadow-dom';
8+
import { ReactShadowDOM } from '@depay/react-shadow-dom';
99
```
1010

1111
```

demo.html renamed to dev.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<title>Demo</title>
88
<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
99
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
10-
<script src="dist/umd/index.js"></script>
10+
<script src="tmp/index.dev.js"></script>
1111
</head>
1212
<body>
1313
<div class="ReactShadowDOM"></div>

dist/cjs/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Object.defineProperty(exports, '__esModule', { value: true });
44

55
var ReactDOM = require('react-dom');
6+
require('react');
67

78
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
89

@@ -52,7 +53,6 @@ function trimStyle(style) {
5253
}
5354

5455
function unmount(outsideContainer) {
55-
5656
if (outsideContainer && outsideContainer.shadowRoot) {
5757
const shadowRoot = outsideContainer.shadowRoot;
5858

dist/es/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ReactDOM from 'react-dom';
2+
import 'react';
23

34
const insideContainerClass = 'ReactShadowDOMInsideContainer';
45

@@ -44,7 +45,6 @@ function trimStyle(style) {
4445
}
4546

4647
function unmount(outsideContainer) {
47-
4848
if (outsideContainer && outsideContainer.shadowRoot) {
4949
const shadowRoot = outsideContainer.shadowRoot;
5050

dist/umd/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function (global, factory) {
2-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react-dom')) :
3-
typeof define === 'function' && define.amd ? define(['exports', 'react-dom'], factory) :
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react-dom'), require('react')) :
3+
typeof define === 'function' && define.amd ? define(['exports', 'react-dom', 'react'], factory) :
44
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ReactShadowDOM = {}, global.ReactDOM));
55
}(this, (function (exports, ReactDOM) { 'use strict';
66

@@ -52,7 +52,6 @@
5252
}
5353

5454
function unmount(outsideContainer) {
55-
5655
if (outsideContainer && outsideContainer.shadowRoot) {
5756
const shadowRoot = outsideContainer.shadowRoot;
5857

package.json

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
{
2-
"name": "depay-react-shadow-dom",
2+
"name": "@depay/react-shadow-dom",
33
"moduleName": "ReactShadowDOM",
4-
"version": "2.0.4",
4+
"version": "3.0.0",
55
"description": "A library to easily render react compatible shadow DOMs for web components with individual styling for inside and outside.",
66
"main": "./dist/cjs/index.js",
77
"files": [
88
"dist"
99
],
1010
"scripts": {
11-
"build": "rm -rf dist && rollup -c",
12-
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
13-
"lint:fix": "eslint \"src/**/*.{js,ts,tsx}\" --fix",
14-
"format": "prettier src --write",
11+
"build": "rm -rf dist && rollup -c rollup.module.config.js",
12+
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
13+
"lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix",
1514
"prepublishOnly": "yarn build",
16-
"demo": "rollup -c rollup.demo.config.js -w",
17-
"test:units": "jest --no-cache",
18-
"test:integration": "yarn cypress run",
19-
"test:cov": "jest --coverage",
20-
"test:watch": "jest --watch --no-cache",
15+
"dev": "rollup -c rollup.dev.config.js -w",
2116
"test:cypress": "yarn cypress run",
2217
"test:cypress:debug": "yarn cypress run --headed --no-exit",
18+
"test:integration": "yarn cypress run",
2319
"test": "yarn test:integration"
2420
},
25-
"repository": "git@github.com:DePayFi/depay-react-shadow-dom.git",
21+
"repository": "git@github.com:DePayFi/react-shadow-dom.git",
2622
"keywords": [
2723
"react",
2824
"shadow dom",
@@ -33,9 +29,9 @@
3329
"author": "depay.fi",
3430
"license": "MIT",
3531
"bugs": {
36-
"url": "https://github.com/DePayFi/depay-react-shadow-dom/issues"
32+
"url": "https://github.com/DePayFi/react-shadow-dom/issues"
3733
},
38-
"homepage": "https://github.com/DePayFi/depay-react-shadow-dom#readme",
34+
"homepage": "https://github.com/DePayFi/react-shadow-dom#readme",
3935
"private": false,
4036
"dependencies": {},
4137
"peerDependencies": {

rollup.demo.config.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)