Skip to content

Commit

Permalink
Bug #2, update EAB archive to November 2017 - ISSUE 195 [iet:10116746]
Browse files Browse the repository at this point in the history
* Plus, extend `index-json` PHP, Gruntfile Javascript
* Fixes for embedding in `noscript` CSS stylesheet
  • Loading branch information
nfreear committed Dec 2, 2017
1 parent 9213345 commit 549c29e
Show file tree
Hide file tree
Showing 9 changed files with 1,623 additions and 27 deletions.
35 changes: 21 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,23 @@
E-Access Bulletin task-runner | © 2016 Nick Freear.
*/

var COUNT_CMD = require('./package.json').scripts.count;
// var COUNT_CMD = 'find eab/issues/ -type f | grep ".txt" | wc -l';
var exec = require('child_process').execSync;
// var PHP_LINT_CMD = 'php -l **/i*.php';
// var INDEX_JSON_CMD = 'perl/index-json.php';
var INDEX_JSON = './eab/index.json';
// var exec = require('child_process').execSync;

module.exports = function (grunt) {
'use strict';

grunt.log.subhead('## Running EAB build and tests.');
grunt.log.writeln();

var bulletinCount = (exec(COUNT_CMD) + '').replace(/\s+/g, '');

// grunt.config.set('bulletinCount', bulletinCount);

grunt.log.oklns('Bulletin count:', bulletinCount);

grunt.initConfig({
bulletinCount: bulletinCount,
exec: {
// count: COUNT_CMD,
bulletins: 'perl perl/bulletins.pl',
build_site: 'perl perl/e-access.pl',
index_json: 'perl/index-json.php',
php_lint: 'php -l **/i*.php',
semistandard: 'node_modules/.bin/semistandard'
},
jshint: {
Expand Down Expand Up @@ -67,7 +62,7 @@ module.exports = function (grunt) {
opensearch_xml: 'eab/*.xml'
},
'string-replace': {
badgesvg: {
badge_svg: {
files: { 'eab/badge.svg': 'eab/badge.svg' },
options: {
replacements: [{
Expand All @@ -76,7 +71,7 @@ module.exports = function (grunt) {
}]
}
},
packagejson: {
package_json: {
files: { 'package.json': 'package.json' },
options: {
replacements: [{
Expand Down Expand Up @@ -109,7 +104,19 @@ module.exports = function (grunt) {
// grunt.loadNpmTasks('grunt-notify');
// grunt.task.run('notify_hooks');

grunt.registerTask('default', [ 'exec', 'jshint', 'htmlhint', 'validate_xml', 'string-replace' ]);
grunt.registerTask('default', [ 'exec', 'jshint', 'htmlhint', 'validate_xml', 'issue-count' ]);

grunt.registerTask('issue-count', [ 'set-issue-count', 'string-replace' ]);

grunt.registerTask('set-issue-count', function () {
// exec(INDEX_JSON_CMD);

var issueCount = require(INDEX_JSON).issue_count;

grunt.config.set('bulletinCount', issueCount);

grunt.log.oklns('Bulletin issue count:', issueCount);
});
};

/*
Expand Down
4 changes: 2 additions & 2 deletions eab/badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion eab/includes/noscript.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ body.pg-embed,
.pg-embed #Body {
background: #fff;
color: #444;
font: .9em verdana, tahoma, arial, helvetica, sans-serif;
font: .84em verdana, tahoma, arial, helvetica, sans-serif;
}

.pg-embed h3 {
Expand Down Expand Up @@ -131,6 +131,10 @@ body.pg-embed,
}

.pg-embed a[ href ] {
color: #039;
text-decoration: underline;
}
.pg-embed a:hover {
color: blue;
}
.pg-embed #totop a {
Expand Down
Loading

0 comments on commit 549c29e

Please sign in to comment.