Files
Stephen Lindberg 991549878a Tails of Equestria v1.6 (#5682)
* Fixed header banner

* Added source drop-down fields for talents and quirks.

* Removed hard-coded talents and quirks. Any data that was in these fields in v1.5 will be automatically migrated as a new row in their respective repeating sections.

* Fixed upgrades/downgrades so be rules-correct for D20/D4 cases, respectively.

* Moved Equipment and Campaign Notes to their own tabs.

* Display version # in banner.

* Updated preview image.

* Include banner graphic in repository.
2019-11-18 12:48:01 -06:00

91 lines
2.0 KiB
JavaScript

module.exports = function(grunt) {
grunt.initConfig({
jshint: {
dist: {
src: ['js/worker.js']
},
options: {
esversion: 6,
globals: {
'_': true,
'generateRowID': true,
'getAttrs': true,
'getSectionIDs': true,
'on': true,
'setAttrs': true
},
strict: true,
sub: true,
undef: true
}
},
less: {
default: {
files: {
'sheet.css': 'less/index.less'
}
}
},
pug: {
default: {
files: {
'sheet.html': 'pug/index.pug'
},
options: {
pretty: true
}
}
},
'string-replace': {
css: {
files: {
'sheet.css': 'sheet.css'
},
options: {
replacements: [
{
pattern: /,\n/g,
replacement: ', '
},
{
pattern: /\.((?!charsheet)[^ .\n]+)(?=.+\{)/g,
replacement: function(match, p1) {
if(p1 === 'itemcontrol' || p1 === 'repcontainer' || p1 === 'repcontrol' || p1 === 'repitem')
return '.' + p1;
else
return '.sheet-' + p1;
}
},
{
pattern: /#([^ .\n]+)(?=.+\{)/g,
replacement: function(match, p1) {
return `#sheet-${p1}`;
}
}
]
}
},
html: {
files: {
'sheet.html': 'sheet.html'
},
options: {
replacements: [
{
pattern: /SCRIPT_VERSION/g,
replacement: '1.6'
}
]
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-pug');
grunt.loadNpmTasks('grunt-string-replace');
grunt.registerTask('default', ['jshint', 'less', 'pug', 'string-replace:css', 'string-replace:html']);
};