Refactoring tests and moving code to common module
1. All tests have been converted into regular command-line mocha tests (instead of running in the browser), and the deployment script has been changed to automatically fail any `--new` deployment which doesn't pass. 2. Several small class (e.g., `Logger`) have been moved into a common module, `crafting-guide-common` so that they may be shared between the client and server.
This commit is contained in:
@@ -51,13 +51,10 @@ module.exports = class MarkdownSectionController extends BaseController
|
||||
refs = tree[1].references
|
||||
|
||||
findLinkRefs = (node)=>
|
||||
logger.debug "inspecting a #{node[0]}"
|
||||
if node[0] is 'link_ref'
|
||||
name = node[2]
|
||||
logger.debug "found a link_ref for #{name}"
|
||||
item = @modPack.findItemByName node[2]
|
||||
if item?
|
||||
logger.debug "found related item: #{item}"
|
||||
node[0] = 'link'
|
||||
node[1].href = Url.item itemSlug:item.slug.item, modSlug:item.slug.mod
|
||||
delete node[1].ref
|
||||
|
||||
Reference in New Issue
Block a user