Skip to content

Commit

Permalink
Fix website structure
Browse files Browse the repository at this point in the history
  • Loading branch information
iansan5653 committed Oct 10, 2023
1 parent 6297512 commit 10856b5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/publish-pages.yml
Expand Up @@ -17,17 +17,11 @@ jobs:

- run: npm install

- run: npm run build

- name: Copy files
run: |
mkdir _site
cp -r pages _site
cp -r dist _site
- run: npm run buildSite

- name: Fix permissions
run: |
chmod -c -R +rX "_site/" | while read line; do
chmod -c -R +rX "pages/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,3 +1,3 @@
node_modules/
dist/
_site/
pages/hotkey
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -14,7 +14,8 @@
"clean": "rm -rf dist",
"prebuild": "npm run clean && npm run lint && mkdir dist",
"pretest": "npm run build",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build",
"buildSite": "npm run build && mkdir -p pages/hotkey && cp -r dist/* pages/hotkey"
},
"files": [
"dist",
Expand Down
2 changes: 1 addition & 1 deletion pages/demo.html
Expand Up @@ -17,7 +17,7 @@
<a href="#ok" data-hotkey="o k">Press <kbd>o k</kbd> click this link</a>

<script type="module">
import {install} from '../dist/index.js'
import {install} from './hotkey/index.js'

for (const el of document.querySelectorAll('[data-hotkey]')) {
install(el)
Expand Down
4 changes: 2 additions & 2 deletions pages/hotkey_mapper.html
Expand Up @@ -46,8 +46,8 @@ <h1 id="app-name">Hotkey Code</h1>
</div>

<script type="module">
import {eventToHotkeyString} from '../dist/index.js'
import sequenceTracker from '../dist/sequence.js'
import {eventToHotkeyString} from './hotkey/index.js'
import sequenceTracker from './hotkey/sequence.js'

const hotkeyCodeElement = document.getElementById('hotkey-code')
const sequenceStatusElement = document.getElementById('sequence-status')
Expand Down

0 comments on commit 10856b5

Please sign in to comment.