Skip to content

Commit

Permalink
Merge pull request #19 from cynack/add_version_header
Browse files Browse the repository at this point in the history
feat: VERSION情報を送るように変更
  • Loading branch information
futahei authored Nov 19, 2021
2 parents ed106bf + aa5fa5c commit cb9cf77
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ env.GITHUB_SHA }}
VERSION: ${{ github.sha }}
- name: slack notification on success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

[![npm version](https://badge.fury.io/js/@cynack%2Ffigni-viewer.svg)](https://badge.fury.io/js/@cynack%2Ffigni-viewer)

## ドキュメント

[figni-viewer document](https://cynack.notion.site/figni-viewer-e5f236458b9d4c889d4d57f7bcbce862)

## 開発方法

1. `npm install`で必要なパッケージをダウンロードする
2. src/のファイルを編集(index.htmlはテスト用のhtmlファイル)
2. src/のファイルを編集(index.html はテスト用の html ファイル)
3. `npm run watch`で test/にテスト用のファイルを出力し、`npm run test`でサーバーを起動して検証
4. `npm run build`でdist/にビルド
4. `npm run build`で dist/にビルド

## 便利コマンド

Expand Down
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<meta charset="utf-8" />
<title>Figni Viewer Sample</title>
<meta name="viewport" content="width=device-width" />
<link
rel="icon"
href="https://icongr.am/simple/git.svg?size=32&color=ff733b&colored=false"
/>
</head>
<body>
<div style="background-color: rgb(247, 247, 247)">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cynack/figni-viewer",
"version": "0.0.13",
"version": "0.0.14",
"description": "",
"main": "./dist/figni-viewer.min.js",
"files": [
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class FigniViewerElement extends ModelViewerElement {
this.arScale = 'fixed'
this.arPlacement = 'floor'
this.interactionPrompt = 'none'
this.shadowIntensity = 1
this.initCameraTarget = this.getAttribute('target') || this.initCameraTarget
this.initCameraOrbit = this.getAttribute('orbit') || this.initCameraOrbit
this.state = this.getAttribute('state') || this.state
Expand Down Expand Up @@ -362,7 +363,7 @@ class FigniViewerElement extends ModelViewerElement {
headers: {
accept: 'application/json',
'X-Figni-Client-Token': this.token,
// 'X-Figni-Client-Version': VERSION,
'X-Figni-Client-Version': VERSION,
},
}
)
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module.exports = () => {
plugins: config.plugins.concat([
new HtmlWebpackPlugin({
template: 'index.html',
hash: true,
}),
]),
})
Expand Down

0 comments on commit cb9cf77

Please sign in to comment.