Skip to content

Commit cc3007a

Browse files
committed
Initial commit
0 parents  commit cc3007a

File tree

10 files changed

+121
-0
lines changed

10 files changed

+121
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules/
2+
.idea/
3+
yarn.lock
4+
package-lock.json
5+
.DS_Store
6+
*.log
7+
*.ipr
8+
*.iml
9+
*.iws

.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
group: edge
2+
3+
language: node_js
4+
5+
node_js:
6+
- 6
7+
- 7
8+
- 8
9+
10+
install: true
11+
12+
before_script:
13+
- npm i -g yarn npm-check-updates
14+
15+
script:
16+
- yarn -i
17+
- yarn predeploy
18+
- if [ -f npm-debug.log ]; then cat npm-debug.log; fi
19+
- ncu -u
20+
- rm -rf yarn.lock
21+
- yarn predeploy
22+
23+
cache:
24+
directories:
25+
- node_modules/
26+
- $HOME/.npm

README.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
= CSS Grid Layout image:https://travis-ci.org/daggerok/css-grid-layout-example.svg?branch=master["Build Status", link="https://travis-ci.org/daggerok/css-grid-layout-example"]
2+
3+
----
4+
yarn -i
5+
yarn start
6+
yarn predeploy
7+
----

app/favicon.ico

1.12 KB
Binary file not shown.

app/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport"
6+
content="width=device-width, user-scalable=no, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>CSS Grid Layout</title>
9+
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
10+
<link rel="stylesheet" href="styles.css">
11+
</head>
12+
<body>
13+
<div id="app"></div>
14+
<script src="main.js"></script>
15+
</body>
16+
</html>

app/main.js

Whitespace-only changes.

app/styles.css

Whitespace-only changes.

gh-pages/postdeploy.bash

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
export REPLACEMENT=css-grid-layout-example
4+
5+
# replace base-path with root:
6+
# /$REPLACEMENT/ -> /
7+
8+
if ! [ -z "$1" ]; then
9+
sed -i -e "s/\<head\>\<base\ href=\"\/$REPLACEMENT\/\"\/>/\<head\>/g" $1
10+
sed -i -e "s/\(href=\"\/$REPLACEMENT\/\)/href=\"\//g" $1
11+
sed -i -e "s/\(src=\"\/$REPLACEMENT\/\)/src=\"\//g" $1
12+
fi

gh-pages/predeploy.bash

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
export REPLACEMENT=css-grid-layout-example
4+
5+
# add base tag:
6+
# <head> -> <head><base href="/$REPLACEMENT/"/>
7+
8+
if ! [ -z "$1" ]; then
9+
sed -i -e "s/\(src=\"\/\)/src=\"\/$REPLACEMENT\//g" $1
10+
sed -i -e "s/\(href=\"\/\)/href=\"\/$REPLACEMENT\//g" $1
11+
sed -i -e "s/\(<head>\)/<head><base href=\"\/$REPLACEMENT\/\"\/>/g" $1
12+
fi

package.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "css-grid-layout-example",
3+
"version": "0.0.1",
4+
"description": "CSS Grid Layout",
5+
"main": "index.html",
6+
"author": "daggerok",
7+
"license": "MIT",
8+
"devDependencies": {
9+
"gh-pages": "1.0.0",
10+
"livereload": "0.6.2",
11+
"ncp": "2.0.0",
12+
"npm-run-all": "4.1.1",
13+
"rimraf": "2.6.2",
14+
"serve": "6.1.0"
15+
},
16+
"scripts": {
17+
"start": "npm-run-all -p start:*",
18+
"start:serve": "serve --cors --single --port 8000 --ignore 'node_modules,.idea' ./app/",
19+
"start:livereload": "livereload",
20+
"predeploy": "yarn -i; npm-run-all predeploy:*",
21+
"predeploy:bash": "bash ./gh-pages/predeploy.bash ./app/index.html",
22+
"predeploy:404": "ncp ./app/index.html ./app/404.html",
23+
"predeploy:nojekyll": "touch ./app/.nojekyll",
24+
"deploy": "gh-pages --dist ./app --src '**/*' --branch gh-pages --dotfiles=true -m \"Github Pages $(date +%Y-%m-%d) deployment\"",
25+
"postdeploy": "npm-run-all -p postdeploy:*",
26+
"postdeploy:bash": "bash ./gh-pages/postdeploy.bash ./app/index.html",
27+
"postdeploy:clean": "rimraf -rf ./app/.nojekyll ./app/404.html ./app/index.html-e"
28+
},
29+
"livereload": {
30+
"exclusions": [
31+
"bower_components",
32+
"node_modules",
33+
"*.json",
34+
"README.*",
35+
"yarn.lock"
36+
]
37+
},
38+
"homepage": "http://daggerok.github.io/css-grid-layout-example"
39+
}

0 commit comments

Comments
 (0)