File tree 9 files changed +63
-19
lines changed
9 files changed +63
-19
lines changed Original file line number Diff line number Diff line change 1
1
deploy :
2
2
surge build huebee.buzz
3
3
4
- gulp :
5
- gulp
4
+ zip :
5
+ rm -rf build/huebee-docs.zip
6
+ cp -r build huebee-docs
7
+ zip -rq build/huebee-docs.zip huebee-docs/
8
+ rm -rf huebee-docs
6
9
7
10
reset :
8
11
rm -rf build/
9
12
10
- prod : reset gulp deploy
13
+ gulp :
14
+ gulp
15
+
16
+ gulp-export : reset
17
+ gulp export
18
+ make zip
19
+
20
+ prod : gulp-export gulp deploy
Original file line number Diff line number Diff line change @@ -21,15 +21,15 @@ description: One-click color picker. Huebee displays a limited set of colors so
21
21
<li >
22
22
CSS:
23
23
<ul >
24
- <li ><a href =" https://unpkg.com/huebee@1/dist/ huebee.min.css" >huebee.min.css</a > minified, or</li >
25
- <li ><a href =" https://unpkg.com/huebee@1/dist/ huebee.css" >huebee.css</a > un-minified</li >
24
+ <li ><a href =" {{ sourceUrlPath }} huebee.min.css" >huebee.min.css</a > minified, or</li >
25
+ <li ><a href =" {{ sourceUrlPath }} huebee.css" >huebee.css</a > un-minified</li >
26
26
</ul >
27
27
</li >
28
28
<li >
29
29
JavaScript:
30
30
<ul >
31
- <li ><a href =" https://unpkg.com/huebee@1/dist/ huebee.pkgd.min.js" >huebee.pkgd.min.js</a > minified, or</li >
32
- <li ><a href =" https://unpkg.com/huebee@1/dist/ huebee.pkgd.js" >huebee.pkgd.js</a > un-minified</li >
31
+ <li ><a href =" {{ sourceUrlPath }} huebee.pkgd.min.js" >huebee.pkgd.min.js</a > minified, or</li >
32
+ <li ><a href =" {{ sourceUrlPath }} huebee.pkgd.js" >huebee.pkgd.js</a > un-minified</li >
33
33
</ul >
34
34
</li >
35
35
</ul >
Original file line number Diff line number Diff line change 1
1
* { box-sizing : border-box; }
2
2
3
3
/* rem font sizing */
4
- html {
5
- font-size : 17px ;
6
- }
4
+ html { font-size : 17px ; }
5
+ html .export { font-size : 14px ; }
7
6
8
7
/* font */
9
8
body , input , button {
10
- font-family : Texta, sans-serif;
9
+ font-family : Texta, Avenir Next , sans-serif;
11
10
}
12
11
13
12
body {
@@ -66,9 +65,8 @@ pre code {
66
65
67
66
68
67
@media screen and ( min-width : 768px ) {
69
- html {
70
- font-size : 19px ;
71
- }
68
+ html { font-size : 19px ; }
69
+ html .export { font-size : 16px ; }
72
70
73
71
pre , code , kbd { font-size : 15px ; }
74
72
Original file line number Diff line number Diff line change @@ -16,8 +16,11 @@ var data = {
16
16
'#FFF' ,
17
17
] ,
18
18
isDev : process . argv [ 2 ] == 'dev' ,
19
+ isExport : process . argv [ 2 ] == 'export' ,
19
20
} ;
20
21
22
+ data . sourceUrlPath = data . isExport ? '' : 'https://unpkg.com/huebee@1/dist/' ;
23
+
21
24
// files that will be watched, tasks that will be run
22
25
var watchables = [ ] ;
23
26
@@ -32,16 +35,30 @@ require('./tasks/css')( data, watch );
32
35
require ( './tasks/js' ) ( data , watch ) ;
33
36
require ( './tasks/content' ) ( data , watch ) ;
34
37
require ( './tasks/cache-bust' ) ( data , watch ) ;
38
+ require ( './tasks/dist' ) ( data , watch ) ;
35
39
36
40
// ----- ----- //
37
41
38
42
gulp . task ( 'default' , [
39
43
'assets' ,
44
+ 'dist' ,
45
+ 'css' ,
46
+ 'js' ,
47
+ 'content' ,
48
+ ] ) ;
49
+
50
+ // ----- export ----- //
51
+
52
+ // version of site used in huebee-docs.zip
53
+ gulp . task ( 'export' , [
54
+ 'dist' ,
40
55
'css' ,
41
56
'js' ,
42
57
'content' ,
43
58
] ) ;
44
59
60
+ // ----- dev ----- //
61
+
45
62
gulp . task ( 'dev' , [ 'assets' , 'content' ] , function ( ) {
46
63
watchables . forEach ( function ( watchable ) {
47
64
gulp . watch . apply ( gulp , watchable ) ;
Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
- <html lang =" en" >
2
+ <html lang =" en" class = " {{ #if isExport }} export {{ /if }} " >
3
3
<head >
4
4
<meta charset =" utf-8" />
5
5
<meta name =" viewport" content =" width=device-width" />
16
16
17
17
{{> palette-styles }}
18
18
19
- {{> head-meta }}
19
+ {{ #unless isExport }}
20
+ {{> head-meta }}
21
+ {{ /unless }}
20
22
21
23
</head >
22
24
<body class =" page--{{ @file.basename }} color4-text color5-bg" >
46
48
<script src =" {{ page.rootPath }} js/huebee-docs.min.js?{{ cacheVersions.js }} " ></script >
47
49
{{ /if }}
48
50
49
- {{ #unless isDev }}
51
+ {{ #unless isExport }}
50
52
<script >
51
53
window .ga = function (){ga .q .push (arguments )};ga .q = [];ga .l = + new Date ;
52
54
ga (' create' ,' UA-58739927-6' ,' auto' );ga (' send' ,' pageview' )
Original file line number Diff line number Diff line change 1
1
<div class =" big-buttons-container" >
2
- <a class =" big-button big-button--fill color0-bg color5-text color3-bg-hover color5-text-hover" href =" #" >
2
+ <a class =" big-button big-button--fill color0-bg color5-text color3-bg-hover color5-text-hover"
3
+ href =" {{ sourceUrlPath }} huebee.pkgd.min.js" >
3
4
<span class =" big-button__plain-text" >Download</span >
4
5
<b class =" big-button__strong-text" >huebee.pkgd.min.js</b >
5
6
</a >
6
- <a class =" big-button big-button--fill color0-bg color5-text color3-bg-hover color5-text-hover" href =" #" >
7
+ <a class =" big-button big-button--fill color0-bg color5-text color3-bg-hover color5-text-hover"
8
+ href =" {{ sourceUrlPath }} huebee.css" >
7
9
<span class =" big-button__plain-text" >Download</span >
8
10
<b class =" big-button__strong-text" >huebee.css</b >
9
11
</a >
Original file line number Diff line number Diff line change 13
13
"glob" : " ^7.1.1" ,
14
14
"gulp" : " ^3.9.1" ,
15
15
"gulp-concat" : " ^2.6.1" ,
16
+ "gulp-filter" : " ^4.0.0" ,
16
17
"gulp-front-matter" : " ^1.3.0" ,
17
18
"gulp-hb" : " ^5.1.4" ,
18
19
"gulp-rename" : " ^1.2.2" ,
Original file line number Diff line number Diff line change 1
1
var gulp = require ( 'gulp' ) ;
2
2
var hbLayouts = require ( 'handlebars-layouts' ) ;
3
3
var frontMatter = require ( 'gulp-front-matter' ) ;
4
+ var filter = require ( 'gulp-filter' ) ;
4
5
var path = require ( 'path' ) ;
5
6
var handlebars = require ( 'gulp-hb' ) ;
6
7
var rename = require ( 'gulp-rename' ) ;
@@ -30,7 +31,11 @@ var partialsSrc = 'modules/**/*/*.hbs';
30
31
module . exports = function ( data , watch ) {
31
32
32
33
gulp . task ( 'content' , function ( ) {
34
+ // exclude 404 if export
35
+ var filterQuery = data . isExport ? [ '**' , '!**/404.*' ] : '**' ;
36
+
33
37
gulp . src ( contentSrc )
38
+ . pipe ( filter ( filterQuery ) )
34
39
. pipe ( frontMatter ( {
35
40
property : 'data.page' ,
36
41
remove : true
Original file line number Diff line number Diff line change
1
+ var gulp = require ( 'gulp' ) ;
2
+
3
+ // copy packery dist to build/
4
+ gulp . task ( 'dist' , function ( ) {
5
+ gulp . src ( 'bower_components/huebee/dist/*.*' )
6
+ . pipe ( gulp . dest ( 'build' ) ) ;
7
+ } ) ;
8
+
9
+ module . exports = function ( ) { } ;
You can’t perform that action at this time.
0 commit comments