Skip to content

Commit

Permalink
Developed method for stashing and sharing old versions of docs; closes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtheclark committed Dec 7, 2013
1 parent 2552297 commit d60452c
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 49 deletions.
55 changes: 17 additions & 38 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
currentVersion = "0.6.0"
currentVersion = "0.7.0"

path = require "path"

module.exports = (grunt) ->
Expand Down Expand Up @@ -65,14 +66,22 @@ module.exports = (grunt) ->
files:
"docs/dev/assets/main.css": "docs/dev/assets/main.css"

cssmin:
# Minify docs styles into dist

cssUrlEmbed:
# Embed URLs (fonts, images) into CSS,
# and put the result in dist/
docs:
files:
"docs/dist/assets/css-built.min.css": "docs/dev/assets/main.css"

cssmin:
# Minify docs styles in dist/
docs:
files:
"docs/dist/assets/css-built.min.css": "docs/dist/assets/css-built.min.css"

uglify:
# Minify docs JS into dist
# Minify docs JS into dist/
docs:
files:
"docs/dist/assets/js-built.min.js": [
Expand Down Expand Up @@ -132,34 +141,16 @@ module.exports = (grunt) ->
src: "docs/dev/assets/images/svg-assets/opt"
dest: "docs/dev/assets/scss/grunticon"

imagemin:
# Minify docs images into dist
docs:
files: [
expand: true
cwd: "docs/dev/assets/images"
src: ["*.{jpg,png}"]
dest: "docs/dist/assets/images"
]

htmlmin:
# Minify docs dist html
docs:
options:
removeComments: true
collapseWhitespace: true
collapseWhitespace: false
files:
"docs/dist/index.html": "docs/dist/index.html"

copy:
# Copy docs fonts from dev to dist
docsFonts:
files: [
expand: true
cwd: "docs/dev/assets/fonts"
src: ["*"]
dest: "docs/dist/assets/fonts"
]
# Copy docs/dist to a parallel gh-pages dir
# for updating the live site
docsDist:
Expand All @@ -177,7 +168,6 @@ module.exports = (grunt) ->
src: [
"index.html"
"assets/*"
"assets/**/*"
]
dest: "../gh-pages/old/v#{currentVersion}/"
]
Expand Down Expand Up @@ -235,10 +225,6 @@ module.exports = (grunt) ->
files: ["docs/dev/assets/images/svg-assets/raw/*"]
tasks: ["svg"]

docsImages:
files: ["docs/dev/assets/images/*"]
tasks: ["imagemin:docs"]

connect:
server:
options:
Expand All @@ -256,7 +242,6 @@ module.exports = (grunt) ->
# Clean up docs optimized images
images:
src: [
"docs/dist/images"
"docs/dev/images/svg-assets/opt"
]
# Clean up docs dist folder
Expand Down Expand Up @@ -296,7 +281,6 @@ module.exports = (grunt) ->
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-contrib-connect"
grunt.loadNpmTasks "grunt-contrib-concat"
grunt.loadNpmTasks "grunt-contrib-imagemin"
grunt.loadNpmTasks "grunt-contrib-cssmin"
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-contrib-htmlmin"
Expand All @@ -306,6 +290,7 @@ module.exports = (grunt) ->
grunt.loadNpmTasks "grunt-newer"
grunt.loadNpmTasks "grunt-grunticon"
grunt.loadNpmTasks "grunt-text-replace"
grunt.loadNpmTasks "grunt-css-url-embed"
grunt.loadNpmTasks "assemble"

grunt.registerTask "dev", [
Expand All @@ -326,11 +311,6 @@ module.exports = (grunt) ->
"svgmin:docs"
"grunticon:docs"
]
grunt.registerTask "reImage", [
"clean:images"
"imagemin:docs"
"svg"
]
grunt.registerTask "test", [
"newer:assemble:test"
"testStyle"
Expand All @@ -341,9 +321,8 @@ module.exports = (grunt) ->
]
grunt.registerTask "docsDist", [
"docsDev"
"cssUrlEmbed:docs"
"cssmin:docs"
"newer:imagemin:docs"
"copy:docsFonts"
"uglify:docs"
"assemble:docsDist"
"htmlmin:docs"
Expand All @@ -357,13 +336,13 @@ module.exports = (grunt) ->
]
grunt.registerTask "gh-pages", [
"build"
"docsStyle"
"docsDist"
"copy:docsDist"
]
grunt.registerTask "version", [
"copy:docsVersion"
"replace:version"
"assemble"
"build"
]
grunt.registerTask "default", ["build"]
4 changes: 2 additions & 2 deletions dist/_scut.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Scut, a collection of Sass utilities to ease and improve our implementations of common style-code patterns.
* v0.6.0
* v0.7.0
* Docs at http://davidtheclark.github.io/scut
*/

Expand Down Expand Up @@ -1325,7 +1325,7 @@ $scut-bigtimes: "\2715";
// checkmark
$scut-checkmark: "\2713";

// section sign (double S, hurricane, sectional symbol, the legal doughnut, signum sectiōnis)
// section sign (double S, hurricane, sectional symbol, the legal doughnut, signum sectionis)
$scut-sect: "\00a7";
// paragraph symbol (pilcrow)
$scut-para: "\00b6";
Expand Down
2 changes: 2 additions & 0 deletions docs/dev/assemble/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ github-url: "https://github.com/davidtheclark/scut/blob/v"
github-home: "https://github.com/davidtheclark/scut"
codepen-url: "http://codepen.io/davidtheclark/pen/yCadJ"

old-versions:

categories:

# General item fields --
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/assemble/partials/characters.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@
<h4>Various Symbols</h4>
<dl class="characters-list">
<dt><code>$scut-gt</code></dt>
<dd>></dd>
<dd>&gt;</dd>
<dd>greater than ("\003e")</dd>
<dt><code>$scut-lt</code></dt>
<dd><</dd>
<dd>&lt;</dd>
<dd>less than ("\003c")</dd>
<dt><code>$scut-times</code></dt>
<dd>×</dd>
Expand Down
21 changes: 17 additions & 4 deletions docs/dev/assemble/partials/intro.hbs
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
{{#markdown}}

# Scut <span class="version">v{{version}}</span>
<h1>
Scut
<div class="version">
v{{version}}
</div>
</h1>

**&mdash; a collection of Sass utilities to ease and improve our implementations of common style-code patterns.**


<small>You can think of the word Scut as an acronym for ***S***ass-***C***SS ***Ut***itilies.
(Or you can think of the word in other ways: Scut will do your *scut work*; let Scut be your *scut monkey*. (But whatever you may do at home, be careful how you use this word in polite company. To learn its many and colorful connotations, [have a look at Wiktionary](http://en.wiktionary.org/wiki/scut).))</small>

**BE AWARE:** Scut is in early stages, under active development, *unstable* &mdash; still in [SemVer](http://semver.org/) v0. **Scut is wide, wide open to contributions**, and I will be building on it myself. New features will be added and old features might be improved. So: **if some part of Scut that you had been using suddenly doesn't work, please check this documentation to see what changed.** You might also want to [have a look at the changelog]({{github-home}}/blob/master/CHANGELOG.md).

<a href="https://github.com/davidtheclark/scut/" class="intro-btn">Visit the Github repository</a>

<a href="http://codepen.io/davidtheclark/pen/yCadJ" target="_blank" class="intro-btn">Experiment with Scut on Codepen</a>

**BE AWARE:** Scut is in early stages, under active development, *unstable* &mdash; still in [SemVer](http://semver.org/) v0. **Scut is wide, wide open to contributions**, and I will be building on it myself. New features will be added and old features might be improved. So: **if some part of Scut that you had been using suddenly doesn't work, please check this documentation to see what changed.**

You might also want to [have a look at the changelog]({{github-home}}/blob/master/CHANGELOG.md).

{{!-- Or view older docs:
<ul class="older-docs">
{{#each old-versions}}
<li><a href="old/v{{this}}">v{{this}}</a></li>
{{/each}}
</ul> --}}

{{/markdown}}

<section id="about">
Expand Down
5 changes: 5 additions & 0 deletions docs/dev/assets/scss/_intro.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
@include scut-absolute(n 0 0.5em n);
}

.older-docs {
display: inline;
@extend %scut-list-comma;
}

.intro {
&:after {
content: "-- UTILITIES BELOW --";
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"grunt-newer": "~0.5.4",
"grunt-contrib-clean": "~0.5.0",
"grunt-svgmin": "~0.2.0",
"grunt-contrib-imagemin": "~0.3.0",
"grunt-grunticon": "~0.6.13",
"grunt-contrib-cssmin": "~0.6.2",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-htmlmin": "~0.1.3",
"grunt-contrib-copy": "~0.4.1",
"grunt-text-replace": "~0.3.9"
"grunt-text-replace": "~0.3.9",
"grunt-css-url-embed": "~0.1.2"
}
}
2 changes: 1 addition & 1 deletion release-checklist.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
To release:

- Add notes to changelog.
- Change version number in Gruntfile.
- Change version numbers at top of Gruntfile.
- Run `grunt version`.
- Build and push a new gem.
- Delete the gem.
Expand Down

0 comments on commit d60452c

Please sign in to comment.