Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit 1943b80

Browse files
fix gh-pages publishing
1 parent bf9b8ed commit 1943b80

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
index.html
3+
package-lock.json

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
"description": "",
55
"main": "ecmarkup.js",
66
"dependencies": {
7-
"ecmarkup": "^3.0.1"
7+
"ecmarkup": "^3.11.5"
88
},
99
"devDependencies": {},
1010
"scripts": {
1111
"test": "echo \"Error: no test specified\" && exit 1",
12-
"update-pages": "node node_modules/ecmarkup/bin/ecmarkup.js index.html _index.html --css _ecmarkup.css --js _ecmarkup.js --verbose && git checkout gh-pages && rm -f index.html ecmarkup.css ecmarkup.js && mv _index.html index.html && mv _ecmarkup.css ecmarkup.css && mv _ecmarkup.js ecmarkup.js && git add index.html ecmarkup.js ecmarkup.css && git commit -m \"update pages\" && git checkout master"
12+
"build": "ecmarkup proposal.html index.html --verbose --toc",
13+
"update-pages": "./publi.sh"
1314
},
1415
"author": "Brian Terlson",
15-
"license": "BSD-2-Clause"
16+
"license": "BSD-2-Clause",
17+
"private": true
1618
}

index.html proposal.html

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
stage: 0
55
contributors: Brian Terlson
66
</pre>
7-
<script src="ecmarkup.js"></script>
8-
<link rel=stylesheet href="ecmarkup.css">
97

108
<emu-intro id="intro">
119
<h1>Introduction</h1>

publi.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
2+
TEMP_BRANCH=$(date +%s.%N | md5sum | cut -d ' ' -f 1)
3+
set -x
4+
git checkout --orphan "$TEMP_BRANCH"
5+
npm install
6+
npm run build
7+
git reset .
8+
git add -f index.html
9+
git commit -m gh-pages
10+
git push -f origin HEAD:gh-pages
11+
git checkout -f "$CURRENT_BRANCH"
12+
git branch -D "$TEMP_BRANCH"

0 commit comments

Comments
 (0)