Skip to content

Commit

Permalink
Merge pull request #274 from svozza/fix-raw-cdn-issue
Browse files Browse the repository at this point in the history
Use cdn.rawgithub and Link To Specific Version Rather Than Master
  • Loading branch information
svozza committed Apr 18, 2015
2 parents 7f4a2b9 + 4d4a089 commit a98cd28
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
30 changes: 22 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,38 @@ module.exports = function (grunt) {
// custom tasks
grunt.loadTasks('./tasks');

grunt.registerTask('release:patch', [
grunt.registerTask('pre-release:patch', [
'test',
'build',
'bump:patch',
'build'
]);

grunt.registerTask('pre-release:minor', [
'test',
'bump:minor',
'build'
]);

grunt.registerTask('pre-release:major', [
'test',
'bump:major',
'build'
]);

grunt.registerTask('release:patch', [
'pre-release:patch',
'npm-publish',
'gh-pages'
]);

grunt.registerTask('release:minor', [
'test',
'build',
'bump:minor',
'pre-release:minor',
'npm-publish',
'gh-pages'
]);

grunt.registerTask('release:major', [
'test',
'build',
'bump:major',
'pre-release:major',
'npm-publish',
'gh-pages'
]);
Expand Down
8 changes: 4 additions & 4 deletions docs/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="stylesheet" href="css/highland.css">
<link rel="stylesheet" href="css/highlight.github.css">
<script src="js/vendor/modernizr.js"></script>
<script src="https://rawgithub.com/caolan/highland/master/dist/highland.js" type="text/javascript"></script>
<script src="https://cdn.rawgit.com/caolan/highland/{{tag}}/dist/highland.js" type="text/javascript"></script>

</head>
<body>
Expand All @@ -30,11 +30,11 @@ <h1>HIGHLAND</h1>
<p>The high-level streams library for Node.js and the browser.</p>
<pre class="npm-install">$ npm install highland</pre>
<p class="show-for-small-only">
<a class="button small" href="https://raw.github.com/caolan/highland/master/dist/highland.js">Download</a>
<a class="button small" href="https://cdn.rawgit.com/caolan/highland/{{tag}}/dist/highland.js">Download</a>
<a class="button small" href="https://github.com/caolan/highland"><i style="margin-right: 3px" class="fi-social-github"></i> Source code</a>
</p>
<p class="show-for-medium-up">
<a class="button" href="https://raw.github.com/caolan/highland/master/dist/highland.js">Download</a>
<a class="button" href="https://cdn.rawgit.com/caolan/highland/{{tag}}/dist/highland.js">Download</a>
<a class="button" href="https://github.com/caolan/highland"><i style="margin-right: 3px" class="fi-social-github"></i> Source code</a>
</p>
</div>
Expand Down Expand Up @@ -253,7 +253,7 @@ <h2 id="{{name}}">{{name}}</h2>
<div id={{id}} class="doc-item">
<div class="doc-heading">
<ul class="links">
<li><a href="https://github.com/caolan/highland/blob/master/lib/index.js#L{{line}}"><i class="fi-pencil"></i> Source</a></li>
<li><a href="https://github.com/caolan/highland/blob/{{tag}}/lib/index.js#L{{line}}"><i class="fi-pencil"></i> Source</a></li>
<li><a href="#{{id}}"><i class="fi-link"></i> Link</a></li>
</ul>
<pre>{{name}}</pre>
Expand Down
7 changes: 3 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2548,7 +2548,7 @@ exposeMethod('last');
* as a parameter.
*
* @id sortBy
* @section Streams
* @section Transforms
* @name Stream.sortBy(f)
* @param f - the sorting function
* @api public
Expand All @@ -2570,9 +2570,8 @@ exposeMethod('sortBy');
* The method for sorting the elements is ascending lexical.
*
* @id sort
* @section Streams
* @name Stream.sortBy(f)
* @param f - the sorting function
* @section Transforms
* @name Stream.sort()
* @api public
*
* var sorted = _(['b', 'z', 'g', 'r]).sort().toArray(_.log);
Expand Down
5 changes: 2 additions & 3 deletions tasks/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,18 @@ module.exports = function (grunt) {

// sort the items in the sections?
Object.keys(sections).forEach(function(sec){
console.log(sections[sec].items)
sections[sec].items.sort(function(item1, item2){
return (item1.id > item2.id ? 1 : -1);
});
console.log(sections[sec].items)
});

var tmpl_src = fs.readFileSync(tmpl_file).toString();
var tmpl = handlebars.compile(tmpl_src);

var html = tmpl({
comments: comments,
sections: sections
sections: sections,
tag: grunt.config.get('pkg.version')
});

fs.writeFileSync(out_file, html);
Expand Down

0 comments on commit a98cd28

Please sign in to comment.