Skip to content

Commit 371869d

Browse files
committed
Prep for deploying gh-pages.
1 parent c7fba4e commit 371869d

File tree

6 files changed

+19
-10
lines changed

6 files changed

+19
-10
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
npm-debug.log
44

55
# Exclude compiled files
6-
lib
6+
/gh-pages
7+
/lib
78

89
demo/assets/app.js

demo/assets/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html class="no-js" lang="">
2+
<html>
33

44
<head>
55
<meta charset="utf-8">
@@ -11,6 +11,7 @@
1111
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
1212
<link rel="stylesheet" href="//bootswatch.com/cerulean/bootstrap.min.css">
1313

14+
<link rel="stylesheet" type="text/css" href="/styles.css">
1415
<link rel="stylesheet" type="text/css" href="/transitions.css">
1516
</head>
1617

demo/assets/styles.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
h2 {
2+
margin-top: 50px;
3+
}
4+
body {
5+
padding-bottom: 100px;
6+
}

demo/assets/transitions.css

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
h2 {
2-
margin-top: 50px;
3-
}
4-
body {
5-
padding-bottom: 100px;
6-
}
7-
81

92
/* Cross-fade transition */
3+
104
.cross-fade-leave {
115
opacity: 1;
126
}

gulpfile.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,9 @@ gulp.task('demo', ['demo:bundleAndWatch'], function() {
6868
gulp.watch('demo/assets/transitions.css').on('change', reload);
6969
gulp.watch('demo/assets/app.js').on('change', reload);
7070
});
71+
72+
gulp.task('gh-pages', ['demo:bundle'], function() {
73+
require('del').sync(['gh-pages/**/*.*', '!gh-pages', '!gh-pages/.git']);
74+
return gulp.src('demo/assets/**/*.*')
75+
.pipe(gulp.dest('gh-pages'));
76+
});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"scripts": {
1111
"test": "echo \"No test implemented\" && exit 0",
1212
"prebuild": "rm -rf lib && gulp lint",
13-
"build": "node_modules/.bin/babel ./src --out-dir ./lib",
13+
"build": "./node_modules/.bin/babel ./src --out-dir ./lib",
1414
"prepublish": "npm run build"
1515
},
1616
"dependencies": {
@@ -26,6 +26,7 @@
2626
"babelify": "^6.3.0",
2727
"browser-sync": "^2.9.11",
2828
"browserify": "^11.2.0",
29+
"del": "^2.0.2",
2930
"eslint": "^1.6.0",
3031
"eslint-plugin-react": "^3.5.1",
3132
"gulp": "^3.9.0",

0 commit comments

Comments
 (0)