kickster 0.2.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ac58d83017de50db4f432b141d51bce5e3e3a48
4
- data.tar.gz: ffedf17081bbbdb3cfbb519fc270f468e114a5ee
3
+ metadata.gz: 39d4a15e78cf0ff3150cc1ad58c24c6699ebc1b6
4
+ data.tar.gz: 531f82623452317f33585786e1e26398d0961440
5
5
  SHA512:
6
- metadata.gz: a4e5e91bbedfafae7a36d450177329f2e0afcbbeb8c74c92d583f6bc6ab05cf7935e987cdcc1f18f32b906e742470f15ff4ab07414364ff86fc1a8905e5f4939
7
- data.tar.gz: e088495db8749a01a5b227b832c63839333e4efd74ad71ee18a102de2bee73a308a86b3945f95fa219088c20a0762d074ddbc0d3c393b9a203320b3a51f6c545
6
+ metadata.gz: a89dba382f77fcd34a6a10e5bd92acb6c101fdef7c190a5df0114de803803e2fdeac68d06f508cd702a82561bb368815723ddd635306340e5bbfcff9e2d065fb
7
+ data.tar.gz: c3843aeb6605dac9a4b299d4ae4da6152261f91446cfb546392b3014117625d0042f8a0ee72260f78203315aeb7cd59750590d68dc4b18f53e2894804a8c1431
data/.gitignore CHANGED
@@ -1,6 +1,9 @@
1
+ /.asset-cache/
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /Gemfile.lock
5
+ /_site/
6
+ /_vendor/
4
7
  /_yardoc/
5
8
  /coverage/
6
9
  /doc/
@@ -5,4 +5,4 @@ branches:
5
5
  language: ruby
6
6
  notifications:
7
7
  email: false
8
- rvm: 2.1.3
8
+ rvm: 2.2.3
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  Kickster
2
2
  ========
3
3
 
4
- Jekyll starter template with GitHub Pages deploy to kickstart your project.
4
+ [![Join the chat at https://gitter.im/nielsenramon/kickster](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nielsenramon/kickster?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5
5
 
6
- ### Installation
6
+ Jekyll starter template with GitHub Pages (automated) deploy to kickstart your project.
7
+
8
+ ## Installation
7
9
 
8
10
  Install the gem:
9
11
 
@@ -13,17 +15,15 @@ Execute gem and scaffold Kickster files:
13
15
 
14
16
  kickster new site_name
15
17
 
16
- Set up your environment:
18
+ Setup your environment:
17
19
 
18
20
  bin/setup
19
21
 
20
- Update `baseurl` and `assets:baseurl` in `_config.yml` with the correct path.
21
-
22
- *If you do not want the Kickster files but just the deploy then copy `bin/setup` script to your repo and your ready to go.*
22
+ *If you do not want the Kickster files but just the deploy then copy the `bin/deploy` script to your repo and your ready to go.*
23
23
 
24
- ### Development
24
+ ## Development
25
25
 
26
- Run Jekyll
26
+ Run Jekyll:
27
27
 
28
28
  bundle exec jekyll serve --watch
29
29
 
@@ -34,23 +34,67 @@ Used tools:
34
34
  - Influences from [HTML5 Boilerplate](https://html5boilerplate.com/)
35
35
  - [Autoprefixer](https://github.com/postcss/autoprefixer)
36
36
 
37
- ### Deploy to GitHub Pages
37
+ ## Manual deploy to GitHub Pages
38
+
39
+ Run this in the root project folder in your console:
40
+
41
+ bin/deploy
42
+
43
+ Thats it, enjoy your nicely build project on GitHub pages!
44
+
45
+ ## Automated deployment with TravisCI
46
+
47
+ Automated deployment is not by default included in your generated Kickster project. Please follow the steps below to include automated deployment.
48
+
49
+ *Note that changes will only deploy when your code is merged into master.*
50
+
51
+ #### 1. Copy the required automated deploy script
52
+
53
+ Copy the [automated](https://github.com/nielsenramon/kickster/blob/master/snippets/automated) script inside the `/bin` folder of your project.
54
+
55
+ #### 2. Update `.travis.yml`
56
+
57
+ Replace your `.travis.yml` file with [this](https://github.com/nielsenramon/kickster/blob/master/snippets/.travis.yml) one.
58
+ And adjust the following 2 lines with your information:
59
+
60
+ - USERNAME: <your-github-username>
61
+ - EMAIL: <your-github-email>
62
+
63
+ #### 3. Create a personal access token
64
+
65
+ This is required to push to the GitHub repo from a script.
66
+
67
+ In GitHub go to `settings > Personal access tokens` and create a new one.
68
+ First give it a proper name so it is easy to recognize later. Then check `repo` (check `public_repo` if it is a public repository) and click on create.
69
+
70
+ <img src="https://dl.dropboxusercontent.com/u/20823269/kickster-token.png" alt="Screenshot of token generation in GitHub">
71
+
72
+ Copy the generated token.
73
+
74
+ *Don't forget to enable your repository in [Travis CI](https://travis-ci.org/)*
75
+
76
+ Go back to your project in terminal and input the following:
77
+
78
+ gem install travis
79
+ travis encrypt GITHUB_TOKEN=secret-token-from-github --add
80
+
81
+ This added a line inside your `.travis.yml' file like this:
38
82
 
39
- Run this script and add a customized deploy message:
83
+ secure: <encrypted token>
40
84
 
41
- bin/deploy "custom_message"
85
+ That's it, enjoy your automated deployments from now on!
42
86
 
43
- ### Why
87
+ ## Why
44
88
 
45
89
  Setting up GitHub Pages websites with Jekyll for projects or clients is cumbersome as you have to setup everything from scratch. Kickster helps you kickstart your project settling you with a basic starter template and easy deploy. Deploying is completed in 1 second so updating your website or prototype is a breeze.
46
90
 
47
91
  You can find example project [here](https://github.com/nielsenramon/kickster/tree/website).
48
92
 
49
- ### License
93
+ ## License
50
94
 
51
95
  MIT License
52
96
 
53
- ### Contributing
97
+ ## Contributing
54
98
 
55
99
  1. Fork it ( https://github.com/[my-github-username]/kickster/fork )
56
100
  2. Create your feature branch (`git checkout -b my-new-feature`)
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.author = "Nielsen Ramon"
9
9
  spec.summary = "Hassle-free deploying to GitHub Pages with Jekyll."
10
- spec.description = "Jekyll starter template with GitHub Pages deploy to kickstart your project."
10
+ spec.description = "Jekyll starter template with GitHub Pages (automated) deploy to kickstart your project."
11
11
  spec.email = "nielsenramon1@gmail.com"
12
12
  spec.homepage = "http://kickster.nielsenramon.com/"
13
13
  spec.license = "MIT"
@@ -1,3 +1,3 @@
1
1
  module Kickster
2
- VERSION = "0.2.0"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -0,0 +1,41 @@
1
+ #!/bin/bash
2
+
3
+ ORIGIN_URL=`git config --get remote.origin.url`
4
+ ORIGIN_CREDENTIALS=${ORIGIN_URL/\/\/github.com/\/\/$GITHUB_TOKEN@github.com}
5
+ COMMIT_MESSAGE=$(git log -1 --pretty=%B)
6
+
7
+ echo "Started deploying to the gh-pages branch."
8
+
9
+ echo "Creating clean gh-pages branch."
10
+ if [ `git branch | grep gh-pages` ]
11
+ then
12
+ git branch -D gh-pages
13
+ fi
14
+ git checkout -b gh-pages
15
+
16
+ echo "Building site."
17
+ bower install
18
+ bundle exec jekyll build --destination temp || exit 1
19
+
20
+ echo "Removing old files"
21
+ find . -maxdepth 1 ! -name 'temp' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
22
+
23
+ mv temp/* . || exit 1
24
+ rm -R temp/ || exit 1
25
+
26
+ echo "Pushing content"
27
+ git config user.name "$USERNAME"
28
+ git config user.email "$EMAIL"
29
+
30
+ git add -fA || exit 1
31
+ git commit --allow-empty -m "$COMMIT_MESSAGE" || exit 1
32
+
33
+ git push -f -q "$ORIGIN_CREDENTIALS" gh-pages > /dev/null 2>&1
34
+
35
+ echo "Deployed Successfully"
36
+
37
+ echo "Checking out previous branch"
38
+ git checkout -
39
+ bower install
40
+
41
+ exit 0
@@ -0,0 +1,15 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.3
4
+ install:
5
+ - ./bin/setup
6
+ script:
7
+ - bundle exec jekyll build --trace
8
+ - bundle exec htmlproof ./_site --only-4xx
9
+ after_success:
10
+ - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && "./bin/travis-deploy"
11
+ env:
12
+ global:
13
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
14
+ - USERNAME: <your-github-username>
15
+ - EMAIL: <your-github-email>
@@ -1,5 +1,6 @@
1
1
  !.keep
2
2
  *.DS_Store
3
3
  *.sass-cache
4
+ /.asset-cache/*
4
5
  /_site/*
5
6
  /_vendor/*
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.3
4
+ install:
5
+ - ./bin/setup
6
+ script:
7
+ - bundle exec jekyll build --trace
8
+ - bundle exec htmlproof ./_site --only-4xx
9
+ env:
10
+ global:
11
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
@@ -1,8 +1,9 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "autoprefixer-rails", "~> 6.1", ">= 6.1.0.1"
4
- gem "jekyll", "~> 3.0", ">= 3.0.1"
5
- gem "jekyll-assets", "~> 2.0"
3
+ gem "autoprefixer-rails", "~> 6.1.0.1"
4
+ gem "html-proofer", "~> 2.5.2"
5
+ gem "jekyll", "~> 3.0.1"
6
+ gem "jekyll-assets", "~> 2.0.2"
6
7
  gem "jekyll-sitemap", "~> 0.9.0"
7
- gem "sass", "~> 3.4", ">= 3.4.19"
8
- gem "uglifier", "~> 2.7", ">= 2.7.2"
8
+ gem "sass", "~> 3.4.19"
9
+ gem "uglifier", "~> 2.7.2"
@@ -1,26 +1,26 @@
1
1
  # <%= camel_name %>
2
2
 
3
- ### Installation
3
+ ## Installation
4
4
 
5
- Set up your environment
5
+ Setup your environment:
6
6
 
7
7
  bin/setup
8
8
 
9
- ### Development
9
+ ## Development
10
10
 
11
- Run Jekyll
11
+ Run Jekyll:
12
12
 
13
13
  bundle exec jekyll serve --watch
14
14
 
15
15
  Used tools:
16
- - [Jekyll assets](http://ixti.net/jekyll-assets/)
16
+ - [Jekyll assets](https://github.com/jekyll/jekyll-assets)
17
17
  - [Bower](http://bower.io/)
18
18
  - [Jekyll](http://jekyllrb.com/)
19
19
  - Influences from [HTML5 Boilerplate](https://html5boilerplate.com/)
20
20
  - [Autoprefixer](https://github.com/postcss/autoprefixer)
21
21
 
22
- ### Deploy to GitHub Pages
22
+ ## Deploy to GitHub Pages
23
23
 
24
- Run this script and add a customized deploy message:
24
+ Run this in the root project folder in your console:
25
25
 
26
- bin/deploy "custom_message"
26
+ bin/deploy
@@ -1,15 +1,3 @@
1
- permalink: pretty
2
- name: <%= snake_name %>
3
-
4
- exclude:
5
- - .bowerrc
6
- - .scss-lint.yml
7
- - Gemfile
8
- - Gemfile.lock
9
- - README.md
10
- - bower.json
11
- - bin/*
12
-
13
1
  assets:
14
2
  sources:
15
3
  - _assets/fonts
@@ -19,10 +7,22 @@ assets:
19
7
  - _vendor/
20
8
 
21
9
  baseurl: /
22
- url: /
10
+
11
+ exclude:
12
+ - .bowerrc
13
+ - .travis.yml
14
+ - bin/*
15
+ - bower.json
16
+ - Gemfile
17
+ - Gemfile.lock
18
+ - README.md
19
+
20
+ ga_analytics: UA-XXXXXXXX-X
23
21
 
24
22
  gems:
25
23
  - jekyll-assets
26
24
  - jekyll-sitemap
27
25
 
28
- ga_analytics: UA-XXXXXXXX-X
26
+ name: <%= snake_name %>
27
+
28
+ permalink: pretty
@@ -3,9 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta http-equiv="x-ua-compatible" content="ie=edge">
6
-
7
6
  <title>{{ site.name }} | {{ page.title }}</title>
8
-
9
7
  <meta name="description" content="{{ page.description }}">
10
8
  <meta name="viewport" content="width=device-width, initial-scale=1">
11
9
 
@@ -1,15 +1,13 @@
1
- #!/bin/sh
1
+ #!/usr/bin/env sh
2
2
 
3
3
  # Run this script to deploy the app to Github Pages.
4
4
 
5
+ # Exit if any subcommand fails
5
6
  set -e
6
7
 
7
- if [ -z "$1" ]
8
- then
9
- echo 'Usage: bin/deploy "{commit message}"'
10
- exit 1
11
- fi
8
+ echo "Started deploying"
12
9
 
10
+ # Checkout gh-pages branch.
13
11
  if [ `git branch | grep gh-pages` ]
14
12
  then
15
13
  git branch -D gh-pages
@@ -17,23 +15,25 @@ fi
17
15
 
18
16
  git checkout -b gh-pages
19
17
 
18
+ # Generate site.
20
19
  bower install
21
- bundle exec jekyll build --destination _site
20
+ bundle exec jekyll build --destination temp
22
21
 
22
+ # Port everyting needed inside temp folder.
23
23
  mkdir tmp
24
- cp -a _site/ tmp
25
- cp -a .gitignore tmp
26
- cp -R .git tmp
27
-
28
- find . -maxdepth 1 ! -name 'tmp' -exec rm -rf {} \;
24
+ find . -maxdepth 1 ! -name 'temp' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
29
25
 
30
- cp -a tmp/. .
31
- rm -Rf tmp
26
+ # Move site to root and cleanup files.
27
+ mv temp/* .
28
+ rm -R temp/
32
29
 
30
+ # Push to gh-pages
33
31
  git add -fA
34
- git commit -m "$1"
35
-
36
- git push -f origin gh-pages
32
+ git commit --allow-empty -m "$(git log -1 --pretty=%B)"
33
+ git push -f -q origin gh-pages
37
34
 
35
+ # Move back to previous branch
38
36
  git checkout -
39
37
  bower install
38
+
39
+ echo "Deployed Successfully!"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "<%= snake_name %>",
3
3
  "dependencies": {
4
- "jquery": "~1.11.2"
4
+ "jquery": "~1.11.3"
5
5
  }
6
6
  }
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kickster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nielsen Ramon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2015-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -52,7 +52,8 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
- description: Jekyll starter template with GitHub Pages deploy to kickstart your project.
55
+ description: Jekyll starter template with GitHub Pages (automated) deploy to kickstart
56
+ your project.
56
57
  email: nielsenramon1@gmail.com
57
58
  executables:
58
59
  - kickster
@@ -71,10 +72,12 @@ files:
71
72
  - lib/kickster/generator.rb
72
73
  - lib/kickster/install.rb
73
74
  - lib/kickster/version.rb
75
+ - snippets/automated
76
+ - snippets/travis.yml
74
77
  - template/.bowerrc
75
78
  - template/.gitignore
76
79
  - template/.ruby-version
77
- - template/404.html
80
+ - template/.travis.yml
78
81
  - template/Gemfile
79
82
  - template/README.md.tt
80
83
  - template/_assets/fonts/.keep
@@ -1,53 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Page Not Found</title>
6
- <meta name="viewport" content="width=device-width, initial-scale=1">
7
- <style type="text/css">
8
- * {
9
- line-height: 1.2;
10
- margin: 0;
11
- }
12
-
13
- html {
14
- color: #888;
15
- display: table;
16
- font-family: sans-serif;
17
- height: 100%;
18
- text-align: center;
19
- width: 100%;
20
- }
21
-
22
- body {
23
- display: table-cell;
24
- vertical-align: middle;
25
- margin: 2em auto;
26
- }
27
-
28
- h1 {
29
- color: #555;
30
- font-size: 2em;
31
- font-weight: 400;
32
- }
33
-
34
- p {
35
- margin: 0 auto;
36
- width: 280px;
37
- }
38
-
39
- @media only screen and (max-width: 280px) {
40
- body, p { width: 95%; }
41
-
42
- h1 {
43
- font-size: 1.5em;
44
- margin: 0 0 0.3em;
45
- }
46
- }
47
- </style>
48
- </head>
49
- <body>
50
- <h1>Page Not Found</h1>
51
- <p>Sorry, but the page you were trying to view does not exist.</p>
52
- </body>
53
- </html>