Author SHA1 Message Date
Andrew Miner 9ddbd5cda7 Add remaining commands 2016-04-15 21:22:10 -07:00
Andrew Miner 31f6e12844 wip 2016-04-13 22:31:11 -07:00
Andrew Miner 14278c81df Add first stage of a new single-file parser
This first stage consists of the general framework for the parser as
a whole, a lexical analyzers to converts text into commands, and the
semantic anlyzer to convert commands into a complete data structure
representing the cumulative effect of running the commands.
2016-04-10 13:37:17 -07:00
Andrew Miner 29315f03f7 Clear screen after running tests during wait 2016-04-10 13:36:25 -07:00
Andrew Miner 5877a3234f Remove experimental session storage mechanism 2016-04-06 21:19:32 -07:00
Andrew Miner 6650413e59 Don't use SSL for server connections 2016-04-06 19:49:23 -07:00
Andrew Miner 197d7b1e1b Use same-domain addresses for API calls 2016-04-06 19:35:45 -07:00
Andrew Miner cdb2989c0a Store session cookie in local storage 2016-04-06 18:29:08 -07:00
Andrew Miner 76ae358878 Fix Gruntfile to actually uglify production code 2016-04-05 22:42:13 -07:00
Andrew Miner d47f174848 Add meta descriptions for new pages 2016-04-05 21:41:47 -07:00
Andrew Miner 59cc962cc0 Add "deploy" task to do staging and prod at once 2016-04-05 20:46:29 -07:00
Andrew Miner 6a98afa9f2 Include *.txt files when uploading to S3 2016-04-05 20:39:50 -07:00
Andrew Miner b6d17f985f Remove old news 2016-04-05 20:04:31 -07:00
Andrew Miner f7fdf71d63 Update news to announce the new site! 2016-04-05 19:58:26 -07:00
Andrew Miner a9bf0d1468 Update upload script to use correct environments 2016-04-05 18:38:24 -07:00
Andrew Miner 8bb25cd09a Correct errors in upload / deploy scripts 2016-04-05 18:30:21 -07:00
Andrew Miner 2f6af50d4b 3.2.2 2016-04-05 18:17:50 -07:00
Andrew Miner f70dd4a562 Update publish script to push new version 2016-04-05 18:17:28 -07:00
Andrew Miner 36a2f47686 3.2.1 2016-04-05 18:11:21 -07:00
Andrew Miner 302050583e Update copyright notice 2016-04-05 18:10:50 -07:00
Andrew Miner 2e4418d16a 3.2.0 2016-04-04 21:05:02 -07:00
Andrew Miner eef91c4ff7 Correct index.coffee error 2016-04-04 21:02:57 -07:00
Andrew Miner c4cd06b59e 3.1.1 2016-04-04 20:58:42 -07:00
Andrew Miner 96db9a07e9 Include constants in the NPM package 2016-04-04 20:58:19 -07:00
Andrew Miner ffdfe33b83 3.1.0 2016-04-04 19:39:16 -07:00
Andrew Miner 1f380f981e Add complete set of files for NPM package 2016-04-04 19:38:46 -07:00
Andrew Miner a45082d276 3.0.2 2016-04-04 19:22:31 -07:00
Andrew Miner 8bf15e2224 Include BaseModel NPM package 2016-04-04 19:22:05 -07:00
Andrew Miner b4714dace1 3.0.1 2016-04-04 19:13:34 -07:00
Andrew Miner d18cbb407a Update publish command to clean up 2016-04-04 19:13:12 -07:00
Andrew Miner 2cc3d04be2 3.0.0 2016-04-04 19:11:20 -07:00
Andrew Miner e59b541b1b Update build process to include NPM packaging 2016-04-04 19:10:59 -07:00
Andrew Miner 7b1930ef5c 2.0.0 2016-04-04 17:25:59 -07:00
Andrew Miner 536ff55bd5 Fix publish script 2016-04-04 17:25:42 -07:00
Andrew Miner 39ceaa9223 Include gif files in S3 upload 2016-04-03 22:56:48 -07:00
Andrew Miner c91e0a6019 Allow site to recognize "staging.crafting-guid..." 2016-04-03 21:22:23 -07:00
Andrew Miner 150b9ae0e3 Use "staging.craftin..." instead of "new.crafti.." 2016-04-03 21:12:30 -07:00
Andrew Miner c608ad4218 Ensure upload task fails if upload fails 2016-04-03 20:59:57 -07:00
Andrew Miner fce0f45104 Report failures in upload for CircleCI 2016-04-03 20:46:37 -07:00
Andrew Miner 2f1793e62a Grant sudo to pip command 2016-04-03 20:37:29 -07:00
Andrew Miner 1397998ab0 Add CircleCI dependencies for building 2016-04-03 20:33:43 -07:00
Andrew Miner a54b57514e Fix error in Gruntfile 2016-04-03 20:23:54 -07:00
Andrew Miner aa1589f23b Update build to use correct command in CircleCI 2016-04-03 20:20:40 -07:00
Andrew Miner d3f78e9349 Update circle.ci to install grunt 2016-04-03 20:00:10 -07:00
Andrew Miner a73850897f Add dist command to build process 2016-04-03 19:55:24 -07:00
Andrew Miner 5895ac6d30 Update staging deployment scripts 2016-04-03 19:39:58 -07:00
Andrew Miner d69585facd Refactor website with new design & structure 2016-04-03 19:30:15 -07:00
431 changed files with 8937 additions and 37889 deletions
+2 -1
View File
@@ -1,9 +1,10 @@
*.log
.DS_Store
.sass-cache
.tm_properties
aws.config
build
deploy
dist
node_modules
src/coffee/views.js
templates.js
+1
View File
@@ -0,0 +1 @@
2.2.0
+233 -92
View File
@@ -1,62 +1,98 @@
###
#
# Crafting Guide - Gruntfile.coffee
#
# Copyright (c) 2014 by Redwood Labs
# Copyright © 2014-2016 by Redwood Labs
# All rights reserved.
###
#
fs = require 'fs'
util = require 'util'
fs = require 'fs'
########################################################################################################################
LIBRARY_ALIAS_MAPPING = [
'./node_modules/backbone/backbone.js:backbone'
'./node_modules/jade/runtime.js:jade'
'./node_modules/jquery/dist/jquery.js:jquery'
'./node_modules/underscore/underscore.js:underscore'
'./node_modules/when/when.js:when'
EXTERNAL_LIBS = [
'backbone'
'jquery'
'marked'
'underscore'
'underscore.inflections'
'when'
'./vendor/email.js:emailjs'
]
LIBRARIES = (s.substring(0, s.indexOf(':')) for s in LIBRARY_ALIAS_MAPPING)
ALIASES = (s.substring(s.indexOf(':') + 1) for s in LIBRARY_ALIAS_MAPPING)
PUBLISHED_FILES = [
'./client/models/base_model.coffee'
'./client/models/game/inventory.coffee'
'./client/models/game/item.coffee'
'./client/models/game/item_slug.coffee'
'./client/models/game/mod.coffee'
'./client/models/game/mod_version.coffee'
'./client/models/game/multiblock.coffee'
'./client/models/game/recipe.coffee'
'./client/models/game/stack.coffee'
'./client/models/game/simple_stack.coffee'
'./client/models/parsing/command_parser_version_base.coffee'
'./client/models/parsing/mod_parser.coffee'
'./client/models/parsing/mod_parser_v1.coffee'
'./client/models/parsing/mod_version_parser.coffee'
'./client/models/parsing/mod_version_parser_v1.coffee'
'./client/models/parsing/versioned_parser_base.coffee'
'./client/models/site/tutorial.coffee'
'./common/constants.coffee'
'./common/underscore.coffee'
'./index.coffee'
]
########################################################################################################################
module.exports = (grunt)->
grunt.loadTasks tasks for tasks in grunt.file.expand './node_modules/grunt-*/tasks'
grunt.config.init
browserify:
dev:
compress:
static:
options:
browserifyOptions:
debug: true
extensions: ['.coffee']
transform: ['coffeeify']
files: './dist/js/main.js': ['./src/coffee/main.coffee']
prod:
options:
browserifyOptions:
extensions: ['.coffee']
transform: ['coffeeify']
files: './dist/js/main.js': ['./src/coffee/main.coffee']
mode: 'gzip'
files: [
{expand: true, cwd:'./build/static', src:'**/*.css', dest:'./dist/'}
{expand: true, cwd:'./build/static', src:'**/*.html', dest:'./dist/'}
{expand: true, cwd:'./build/static', src:'**/*.ugly.js', dest:'./dist/', ext: '.js'}
{expand: true, cwd:'./build/static', src:'**/*.json', dest:'./dist/'}
{expand: true, cwd:'./build/static', src:'**/*.ttf', dest:'./dist/'}
{expand: true, cwd:'./build/static', src:'**/*.txt', dest:'./dist/'}
]
coffee:
dev:
options:
sourceMap: true
files: [expand:true, cwd:'./src/coffee', src:'**/*.coffee', dest:'./dist', ext:'.js']
clean:
dist: ['./dist']
npm_package:
options: {
bare: true
}
files: [
{expand:true, cwd:'./src', src:PUBLISHED_FILES, dest:'./dist', ext:'.js'}
]
copy:
styles:
files: [expand:true, cwd:'./src/css', src:'**/*.scss', dest:'./dist/src/css']
assets_build:
files: [
{expand:true, cwd:'./assets/', src:'**/*', dest:'./build/static'}
]
build_to_dist:
files: [
{expand:true, cwd:'./build/static/', src:['**/*', '!**/*.map', '!**/*.js'], dest:'./dist'}
]
common_source:
files: [
{expand:true, cwd:'./src/common', src:'**/*.coffee', dest:'./build', ext:'.coffee'}
]
server_source:
files: [
{expand:true, cwd:'./src/server', src:'**/*.coffee', dest:'./build', ext:'.coffee'}
]
exorcise:
dev:
files: './dist/js/main.js.map': ['./dist/js/main.js']
clean:
assets: ['./build/static/data', './build/static/images']
build: ['./build']
dist: ['./dist']
templates: ['./src/client/site/templates.js']
jade:
pages:
@@ -64,23 +100,26 @@ module.exports = (grunt)->
pretty: true
files: [
expand: true
cwd: './src/jade'
src: '*.jade'
dest: './dist'
ext: '.html'
cwd: './src/client/site'
src: '**/index.jade'
dest: './build/static'
ext: '.html'
]
templates:
options:
client: true
node: true
processName: (f)->
f = f.replace './src/jade/templates/', ''
f = f.replace '.jade', ''
f = f.replace /\//g, '_'
return f
processName: (path)->
pathElements = path.split '\/'
while true
element = pathElements.shift()
break if element is 'site'
pathElements.pop()
name = pathElements.join '/'
name = name.replace '.jade', ''
return name
files:
'./src/coffee/views.js': ['./src/jade/templates/**/*.jade']
'./src/client/site/templates.js': ['./src/client/site/**/!(index)*.jade']
mochaTest:
options:
@@ -89,28 +128,23 @@ module.exports = (grunt)->
reporter: 'dot'
require: [
'coffee-script/register'
'./test/test_helper.coffee'
'./src/test_helper.coffee'
]
verbose: true
src: ['./test/**/*.test.coffee']
rsync:
static:
options:
src: './static/'
dest: './dist/'
recursive: true
src: ['./src/**/*.test.coffee']
sass:
build:
all:
files:
'./dist/css/main.css': ['./src/scss/main.scss']
dist:
options:
sourcemap: 'none'
style: 'compressed'
'./build/static/main.css': [ './build/imports.scss' ]
sass_globbing:
all:
files:
'./dist/css/main.css': ['./src/scss/main.scss']
'./build/imports.scss': [
'./src/client/styles/main.scss'
'./src/client/site/**/*.scss'
]
uglify:
scripts:
@@ -118,46 +152,153 @@ module.exports = (grunt)->
maxLineLen: 20
files: [
expand: true
cwd: './dist/js'
src: '**/*.js'
dest: './dist/js'
cwd: './build/static'
src: '**/*.js'
dest: './build/static'
ext: '.ugly.js'
]
watch:
static:
files: ['./static/**/*']
tasks: ['rsync:static']
coffee:
files: ['./src/**/*.coffee', './src/**/*.js']
tasks: ['browserify:dev', 'exorcise']
jade:
files: ['./src/**/*.jade']
tasks: ['jade:pages', 'jade:templates']
assets:
files: ['./assets/**/*']
tasks: ['copy:assets_build']
client_source:
files: ['./src/{client,common}/**/*.coffee']
tasks: ['browserify:internal']
server_source:
files: ['./src/{common,server}/**/*.coffee']
tasks: ['copy:server_source']
jade_pages:
files: ['./src/**/index.jade']
tasks: ['jade:pages']
jade_templates:
files: ['./src/**/!(index).jade']
tasks: ['jade:templates', 'browserify:internal']
sass:
files: ['./src/**/*.scss']
tasks: ['sass', 'copy:styles']
tasks: ['sass']
test:
files: ['./src/**/*.coffee', './src/**/*.js', './test/**/*.coffee']
tasks: ['test']
tasks: ['script:clear', 'test']
grunt.registerTask 'default', 'build'
# Compound Tasks ###################################################################################################
grunt.registerTask 'build', ['rsync', 'sass:build', 'jade', 'copy', 'browserify:dev', 'exorcise']
grunt.registerTask 'build', 'build the project to be run from a local server',
['jade', 'build:copy', 'build:css', 'browserify:external', 'browserify:internal']
grunt.registerTask 'dist', ['rsync', 'sass:dist', 'jade', 'copy', 'browserify:prod', 'uglify']
grunt.registerTask 'build:copy', 'helper task for build',
['copy:assets_build', 'copy:common_source', 'copy:server_source']
grunt.registerTask 'prepublish', ['clean', 'coffee']
grunt.registerTask 'build:css', 'helper task for build',
['sass_globbing', 'sass']
grunt.registerTask 'use-local-deps', ->
grunt.file.mkdir './node_modules'
grunt.file.delete './node_modules/crafting-guide-common', force:true
fs.symlinkSync '../../crafting-guide-common/', './node_modules/crafting-guide-common'
grunt.registerTask 'default', 'rebuild the project from scratch and start a local HTTP server',
['clean', 'start']
grunt.registerTask 'test', ['mochaTest']
grunt.registerTask 'deploy', 'deploy to both staging and production via CircleCI',
['deploy:staging', 'deploy:prod']
grunt.registerTask 'watch-dev', ['clean', 'build', 'watch']
grunt.registerTask 'deploy:prod', 'deploy the project to production via CircleCI',
['script:deploy:prod']
grunt.registerTask 'watch-test', ['clean', 'build', 'watch:test']
grunt.registerTask 'deploy:staging', 'deploy the project to staging via CircleCI',
['script:deploy:staging']
grunt.registerTask 'dist', 'build the project to be run from Amazon S3',
['build', 'copy:build_to_dist', 'uglify', 'compress']
grunt.registerTask 'prepublish', 'build the project to be published to NPM as shared code',
['clean', 'coffee']
grunt.registerTask 'publish', 'publish the project to NPM',
['prepublish', 'script:publish', 'clean', 'build']
grunt.registerTask 'start', 'build the project and start a local HTTP server',
['build', 'script:start']
grunt.registerTask 'test', 'run unit tests',
['mochaTest']
grunt.registerTask 'upload:prod', 'upload the project to the production Amazon S3 environment',
['dist', 'script:s3_upload:prod']
grunt.registerTask 'upload:staging', 'upload the project the staging Amazon S3 environment',
['dist', 'script:s3_upload:staging']
grunt.registerTask 'useLocalDeps', 'use local dependencies instead of NPM dependencies',
['script:use_local_deps']
# Code Tasks #######################################################################################################
grunt.registerTask 'browserify:external', "Bundle 3rd-party libraries used in the app", ->
grunt.file.mkdir './build/static'
done = this.async()
args = [].concat ("--require=#{lib}" for lib in EXTERNAL_LIBS), [
'--outfile=./build/static/external.js'
]
options = cmd:'browserify', args:args
grunt.util.spawn options, (error)->
console.log error if error?
done()
grunt.registerTask 'browserify:internal', "Bundle source files needed in the browser", ->
grunt.file.mkdir './build/static'
done = this.async()
libs = []
for lib in EXTERNAL_LIBS
parts = lib.split ':'
libs.push parts[parts.length-1]
args = [].concat ("--external=#{lib}" for lib in libs), [
'--extension=.coffee'
'--outfile=./build/static/internal.js'
'--transform=coffeeify'
'./src/client/client.coffee'
]
options = cmd:'browserify', args:args
grunt.util.spawn options, (error)->
console.log error if error?
done()
# Script Tasks #####################################################################################################
grunt.registerTask 'script:clear', "clear the current terminal buffer", ->
done = this.async()
grunt.util.spawn cmd:'clear', opts:{stdio:'inherit'}, (error)-> done(error)
grunt.registerTask 'script:deploy:prod', "deploy code by copying to the production branch", ->
done = this.async()
grunt.util.spawn cmd:'./scripts/deploy', args:['--prod'], opts:{stdio:'inherit'}, (error)-> done(error)
grunt.registerTask 'script:deploy:staging', "deploy code by copying to the staging branch", ->
done = this.async()
grunt.util.spawn cmd:'./scripts/deploy', args:['--staging'], opts:{stdio:'inherit'}, (error)-> done(error)
grunt.registerTask 'script:publish', 'publishes this package to NPM', ->
done = this.async()
grunt.util.spawn cmd:'./scripts/publish', opts:{stdio:'inherit'}, (error)-> done(error)
grunt.registerTask 'script:s3_upload:prod', 'uploads all static content to S3', ->
done = this.async()
grunt.util.spawn cmd:'./scripts/s3_upload', args:['--prod'], opts:{stdio:'inherit'}, (error)-> done(error)
grunt.registerTask 'script:s3_upload:staging', 'uploads all static content to S3', ->
done = this.async()
grunt.util.spawn cmd:'./scripts/s3_upload', args:['--staging'], opts:{stdio:'inherit'}, (error)-> done(error)
grunt.registerTask 'script:start', "start a local HTTP server on port 8080", ->
done = this.async()
grunt.util.spawn cmd:'./scripts/start', opts:{stdio:'inherit'}, (error)-> done(error)
grunt.registerTask 'script:use_local_deps', "use local dependencies instead of NPM dependencies", ->
done = this.async()
grunt.util.spawn cmd:'./scripts/use_local_deps', opts:{stdio:'inherit'}, (error)-> done(error)
# Command-Line Argument Processing #################################################################################
args = process.argv[..]
while args.length > 0
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 206 B

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Before

Width:  |  Height:  |  Size: 801 B

After

Width:  |  Height:  |  Size: 801 B

Before

Width:  |  Height:  |  Size: 860 B

After

Width:  |  Height:  |  Size: 860 B

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

+7 -4
View File
@@ -1,12 +1,15 @@
dependencies:
pre:
- gem install sass --version ">= 3.4"
- gem install sass --version "= 3.4"
- sudo -H pip install s3cmd
- npm install -g browserify
- npm install -g grunt-cli
deployment:
staging:
branch: master
branch: staging
commands:
- ./scripts/deploy --staging
- grunt upload:staging
production:
branch: production
commands:
- ./scripts/deploy --production
- grunt upload:prod
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More