Convert site to a single JavaScript archive
* Convert build to use a single JavaScript file on the site (instead of downloading each library separately). This also means that all global variables (e.g., `$` for JQuery, `_` for Underscore.js) can be removed. * Remove unused scripts and/or move them to a more appropriate repo * Update the `deploy` script to work with CircleCI's automation * Update markdown display code to allow images to be located with the markdown data files instead of the pre-rendered index pages
This commit is contained in:
@@ -5,12 +5,15 @@ Copyright (c) 2014-2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
###
|
||||
|
||||
$ = require 'jquery'
|
||||
backbone = require 'backbone'
|
||||
w = require 'when'
|
||||
{Event} = require '../constants'
|
||||
{ModelState} = require '../constants'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
module.exports = class BaseModel extends Backbone.Model
|
||||
module.exports = class BaseModel extends backbone.Model
|
||||
|
||||
constructor: (attributes={}, options={})->
|
||||
options.logEvents ?= true
|
||||
@@ -70,7 +73,7 @@ module.exports = class BaseModel extends Backbone.Model
|
||||
success: (text, status, xhr)=> resolve @onLoadSucceeded text, status, xhr
|
||||
error: (xhr, status, error)=> reject @onLoadFailed error, status, xhr
|
||||
|
||||
@loading.catch -> # do nothing. prevents unhandled promise warnings
|
||||
@loading.catch (e)-> # do nothing
|
||||
return @loading
|
||||
|
||||
parse: (text)->
|
||||
|
||||
@@ -9,6 +9,7 @@ BaseModel = require './base_model'
|
||||
Inventory = require './inventory'
|
||||
ItemSlug = require './item_slug'
|
||||
Step = require './step'
|
||||
_ = require 'underscore'
|
||||
{Event} = require '../constants'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
@@ -5,6 +5,8 @@ Copyright (c) 2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
###
|
||||
|
||||
require 'underscore'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
module.exports = class EmailClient
|
||||
|
||||
@@ -6,10 +6,11 @@ All rights reserved.
|
||||
###
|
||||
|
||||
BaseModel = require './base_model'
|
||||
{Event} = require '../constants'
|
||||
ItemSlug = require './item_slug'
|
||||
{RequiredMods} = require '../constants'
|
||||
Stack = require './stack'
|
||||
_ = require 'underscore'
|
||||
{Event} = require '../constants'
|
||||
{RequiredMods} = require '../constants'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ All rights reserved.
|
||||
|
||||
BaseModel = require './base_model'
|
||||
CraftingPlan = require './crafting_plan'
|
||||
_ = require 'underscore'
|
||||
{Event} = require '../constants'
|
||||
{Url} = require '../constants'
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ All rights reserved.
|
||||
###
|
||||
|
||||
BaseModel = require './base_model'
|
||||
ItemSlug = require './item_slug'
|
||||
ItemSlug = require './item_slug'
|
||||
_ = require 'underscore'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ Copyright (c) 2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
###
|
||||
|
||||
_ = require 'underscore'
|
||||
{RequiredMods} = require '../constants'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
@@ -6,6 +6,7 @@ All rights reserved.
|
||||
###
|
||||
|
||||
BaseModel = require './base_model'
|
||||
_ = require 'underscore'
|
||||
{Event} = require '../constants'
|
||||
{RequiredMods} = require '../constants'
|
||||
{Url} = require '../constants'
|
||||
|
||||
@@ -6,10 +6,11 @@ All rights reserved.
|
||||
###
|
||||
|
||||
BaseModel = require './base_model'
|
||||
{Event} = require '../constants'
|
||||
Item = require './item'
|
||||
ItemSlug = require './item_slug'
|
||||
Recipe = require './recipe'
|
||||
_ = require 'underscore'
|
||||
{Event} = require '../constants'
|
||||
{RequiredMods} = require '../constants'
|
||||
{Url} = require '../constants'
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ Copyright (c) 2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
###
|
||||
|
||||
_ = require 'underscore'
|
||||
{StringBuilder} = require 'crafting-guide-common'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
@@ -11,6 +11,7 @@ ItemSlug = require '../item_slug'
|
||||
ModVersion = require '../mod_version'
|
||||
Recipe = require '../recipe'
|
||||
Stack = require '../simple_stack'
|
||||
_ = require 'underscore'
|
||||
{StringBuilder} = require 'crafting-guide-common'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
@@ -7,6 +7,7 @@ All rights reserved.
|
||||
|
||||
BaseModel = require './base_model'
|
||||
TutorialParser = require './tutorial_parser'
|
||||
_ = require 'underscore'
|
||||
{Url} = require '../constants'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
@@ -5,6 +5,8 @@ Copyright (c) 2015 by Redwood Labs
|
||||
All rights reserved.
|
||||
###
|
||||
|
||||
_ = require 'underscore'
|
||||
|
||||
########################################################################################################################
|
||||
|
||||
module.exports = class VersionedParserBase
|
||||
|
||||
Reference in New Issue
Block a user