Skip to content

Commit

Permalink
Added npm configuration, added an action to deploy npm package and up…
Browse files Browse the repository at this point in the history
…dated Readme with npm package
  • Loading branch information
RodrigoTomeES committed Mar 10, 2020
1 parent 8e67c82 commit 7563eb5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: yarn install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ReactComment extends window.HTMLElement {
window.customElements.define('react-comment', ReactComment)
```

To include a comment in your JSX or React component, simply include the `<react-comment>` tag with the comment-text as content and import reactComment.js.
To include a comment in your JSX or React component, simply include the `<react-comment>` tag with the comment-text as content and import index.js (you can rename the file) or use the npm package react-jsx-html-comments.
### Import
```javascript
import 'reactComponent'
Expand Down
File renamed without changes.
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "react-jsx-html-comments",
"version": "1.0.0",
"description": "Enable HTML comments and conditional IE comments in React components and JSX using a Web Component (W3C Custom Element).",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/RodrigoTomeES/react-jsx-html-comments.git"
},
"keywords": [
"jsx",
"html",
"react",
"webcomponents",
"webcomponent",
"customelements",
"customelement"
],
"author": "RodrigoTomeES",
"license": "MIT",
"bugs": {
"url": "https://github.com/RodrigoTomeES/react-jsx-html-comments/issues"
},
"homepage": "https://github.com/RodrigoTomeES/react-jsx-html-comments#readme"
}

0 comments on commit 7563eb5

Please sign in to comment.