Skip to content

Commit

Permalink
Publish browser version of package to npm
Browse files Browse the repository at this point in the history
Extract package dependency to script tag in demo
Also trying to fix publish pipeline in package and ci
  • Loading branch information
langsamu committed Apr 9, 2021
1 parent 3dc5228 commit a14cc9e
Show file tree
Hide file tree
Showing 11 changed files with 10,058 additions and 47 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
release:
types: [created]

defaults:
run:
working-directory: ./package

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -14,6 +18,6 @@ jobs:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish package
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 7 additions & 7 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"blockly": "^5.20210325.0",
"sparql-blockly": "^0.0.4-14",
"sparql-blockly": "^0.0.4-15",
"sparqljs": "^3.4.1"
}
}
3 changes: 2 additions & 1 deletion demo/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const config: webpack.Configuration = {
filename: "app.js",
},
externals: {
"blockly": "Blockly"
"blockly": "Blockly",
"sparql-blockly": "SparqlBlockly"
},
resolve: {
extensions: [".ts", ".js"]
Expand Down
2 changes: 1 addition & 1 deletion docs/app.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

<link href="style.css" rel="stylesheet" />
<script src="https://unpkg.com/blockly/blockly.min.js"></script>
<script src="https://unpkg.com/sparql-blockly/sparql-blockly.min.js"></script>
<script src="app.js" defer></script>
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions package/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coverage
dist
sparql-blockly.min.js
Loading

0 comments on commit a14cc9e

Please sign in to comment.