Permalink
Browse files

update banners, metadata, clean up helpers

  • Loading branch information...
1 parent d2509ff commit 292dc97fdbaac834411a1f692c82895810b0d5d9 @jonschlinkert jonschlinkert committed May 1, 2014
View
@@ -0,0 +1,22 @@
+{
+ "esnext": true,
+ "boss": true,
+ "curly": true,
+ "eqeqeq": true,
+ "eqnull": true,
+ "immed": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "node": true,
+ "sub": true,
+ "undef": true,
+ "unused": true,
+ "globals": {
+ "define": true,
+ "before": true,
+ "after": true,
+ "describe": true,
+ "it": true
+ }
+}
View
@@ -24,20 +24,10 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),
jshint: {
+ all: ['Gruntfile.js', 'test/**/*.js'],
options: {
- curly: true,
- eqeqeq: true,
- immed: true,
- latedef: true,
- newcap: true,
- noarg: true,
- sub: true,
- undef: true,
- boss: true,
- eqnull: true,
- node: true
- },
- all: ['Gruntfile.js', 'tasks/*.js', '<%= nodeunit.tests %>']
+ jshintrc: '.jshintrc',
+ }
},
assemble: {
@@ -309,7 +299,7 @@ module.exports = function(grunt) {
replacements: [
{
pattern: ':tag',
- replacement: function (src) {
+ replacement: function () {
return this.tags ? this.tags[0] : 'default';
}
}
View
@@ -654,7 +654,8 @@ Visit [assemble.io/plugins](http:/assemble.io/plugins/) for more information abo
**Brian Woodward**
+ [github/doowb](https://github.com/doowb)
-+ [twitter/doowb](http://twitter.com/jonschlinkert)
++ [twitter/doowb](http://twitter.com/doowb)
+
## License
Copyright (c) 2014 Jon Schlinkert, contributors.
View
@@ -1,7 +1,7 @@
{
"name": "assemble-contrib-permalinks",
- "version": "0.4.0",
+ "version": "0.4.1",
"main": [
- "permalinks.js"
+ "index.js"
]
}
View
@@ -1,10 +1,6 @@
-/*
- * Assemble Plugin: Permalinks
- * https://github.com/assemble/permalinks
- * Assemble is the 100% JavaScript static site generator for Node.js, Grunt.js, and Yeoman.
- *
- * Copyright (c) 2013 Jon Schlinkert, Brian Woodward, contributors.
- * Licensed under the MIT license.
+/**
+ * Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.
+ * Licensed under the MIT License (MIT).
*/
// Node.js
@@ -16,8 +12,6 @@ var permalinks = require('permalinks');
var calculatePath = require('calculate-assets');
var _str = require('underscore.string');
var _ = require('lodash');
-var utils = require('./lib/utils');
-
/**
* Permalinks Plugin
@@ -93,7 +87,6 @@ module.exports = function (assemble) {
var permalink = permalinks(structure, context, options);
-
/**
* WRITE PERMALINKS
* Append the permalink to the dest path defined in the target.
@@ -105,7 +98,7 @@ module.exports = function (assemble) {
if (page.data.basename === 'index') {
page.data.dest = page.dest = page.data.dest || page.dest;
} else {
- page.data.dest = page.dest = path.join(page.data.dirname, permalink).replace(/\\/, '/');
+ page.data.dest = page.dest = path.join(page.data.dirname, permalink).replace(/\\/g, '/');
}
}
page.data.assets = calculatePath(page.data.dest, originalAssets);
View
@@ -1,7 +1,7 @@
{
"name": "assemble-contrib-permalinks",
"description": "Permalinks plugin for Assemble, the static site generator for Grunt.js, Yeoman and Node.js. This plugin enables powerful and configurable URI patterns, [Moment.js](http://momentjs.com/) for parsing dates, much more.",
- "version": "0.4.0",
+ "version": "0.4.1",
"homepage": "https://github.com/assemble/assemble-contrib-permalinks",
"author": {
"name": "Jon Schlinkert",
@@ -1,17 +1,12 @@
/**
- * Handlebars Helpers: {{navigation}}
- * Copyright (c) 2013 Jon Schlinkert
+ * Copyright (c) 2014 Jon Schlinkert
* Licensed under the MIT License (MIT).
*/
'use strict';
-// Node.js
-var path = require('path');
-var fs = require('fs');
var _ = require('lodash');
-
module.exports = function (config) {
var Handlebars = config.Handlebars;
var helpers = {};
@@ -1,24 +1,16 @@
/**
- * Handlebars Helper: {{not}}
- * Copyright (c) 2013 Jon Schlinkert
+ * Copyright (c) 2014 Jon Schlinkert
* Licensed under the MIT License (MIT).
*/
-
'use strict';
-
-// Node.js
-var path = require('path');
-var fs = require('fs');
-
-// node_modules
-var _ = require('lodash');
-
-module.exports = function (config) {
+module.exports = function () {
var helpers = {};
+
/**
* {{not}}
*/
+
helpers.not = function (value, test, options) {
if (value !== test) {
return options.fn(this);
@@ -1,20 +1,11 @@
/**
- * Handlebars Helpers: {{pager}}
- * Copyright (c) 2013 Jon Schlinkert
+ * Copyright (c) 2014 Jon Schlinkert
* Licensed under the MIT License (MIT).
*/
-
'use strict';
-// Node.js
-var path = require('path');
-var fs = require('fs');
-
-// node_modules
var _ = require('lodash');
-
-// Export helpers
module.exports = function (config) {
var Handlebars = config.Handlebars;
var helpers = {};
@@ -1,19 +1,11 @@
/**
- * Handlebars Helpers: {{pagination}}
- * Copyright (c) 2013 Jon Schlinkert
+ * Copyright (c) 2014 Jon Schlinkert
* Licensed under the MIT License (MIT).
*/
-
'use strict';
-// Node.js
-var path = require('path');
-var fs = require('fs');
-
-// node_modules
var _ = require('lodash');
-// Export helpers
module.exports = function (config) {
var Handlebars = config.Handlebars;
var helpers = {};
@@ -1,27 +1,18 @@
/**
- * Handlebars Helpers: {{rel}}
- * Copyright (c) 2013 Jon Schlinkert
+ * Copyright (c) 2014 Jon Schlinkert
* Licensed under the MIT License (MIT).
*/
+'use strict';
-// Node.js
-var path = require('path');
-var fs = require('fs');
+var relative = require('relative');
-
-// Export helpers
-module.exports = function (config) {
+module.exports = function () {
var helpers = {};
- /**
- * {{rel}}
- */
helpers.rel = function(context) {
- var newDest = this.dest;
- var destDirname = path.dirname(context);
- var relativePath = path.relative(path.resolve(destDirname), path.resolve(newDest));
- return relativePath.replace(/\\/g, '/');
+ return relative(context, this.dest);
};
return helpers;
};
+
@@ -1,23 +1,16 @@
-
/**
- * Handlebars Helpers: {{relative}}
- * Copyright (c) 2013 Jon Schlinkert
+ * Copyright (c) 2014 Jon Schlinkert
* Licensed under the MIT License (MIT).
*/
+'use strict';
-// Node.js
-var path = require('path');
+var relative = require('relative');
-// Export helpers
-module.exports = function (config) {
+module.exports = function () {
var helpers = {};
- /**
- * {{relative}}
- */
helpers.relative = function(from, to) {
- var relativePath = path.relative(path.dirname(from), path.dirname(to));
- return path.join(relativePath, path.basename(to)).replace(/\\/g, '/');
+ return relative(from, to);
};
return helpers;
@@ -1,17 +1,10 @@
/**
- * Handlebars Helpers: {{times}}
- * Copyright (c) 2013 Jon Schlinkert
+ * Copyright (c) 2014 Jon Schlinkert
* Licensed under the MIT License (MIT).
*/
'use strict';
-// Node.js
-var path = require('path');
-var fs = require('fs');
-
-
-// Export helpers
module.exports = function (config) {
var Handlebars = config.Handlebars;
var helpers = {};

0 comments on commit 292dc97

Please sign in to comment.