Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

v6.56.2. Updated dependencies.

  • Loading branch information...
commit 812f74a08a0494b2424056fb8b877a035baf49bb 1 parent 2a62d32
@balupton balupton authored
View
2  .travis.yml
@@ -1,7 +1,7 @@
# v1.3.8 November 7, 2013
# https://github.com/bevry/base
language: node_js
-install: "npm install -g npm; npm install; ./node_modules/.bin/cake install"
+install: "npm install; ./node_modules/.bin/cake install"
before_script: "./node_modules/.bin/cake compile"
script: "npm test"
node_js:
View
209 Cakefile
@@ -1,4 +1,4 @@
-# v1.3.8 November 7, 2013
+# v1.3.11 December 11, 2013
# https://github.com/bevry/base
@@ -12,32 +12,45 @@ pathUtil = require('path')
# =====================================
# Variables
-WINDOWS = process.platform.indexOf('win') is 0
-NODE = process.execPath
-NPM = (if WINDOWS then process.execPath.replace('node.exe', 'npm.cmd') else 'npm')
-EXT = (if WINDOWS then '.cmd' else '')
-APP_DIR = process.cwd()
-PACKAGE_PATH = pathUtil.join(APP_DIR, "package.json")
-PACKAGE_DATA = require(PACKAGE_PATH)
-DOCS_DIR = pathUtil.join(APP_DIR, "docs")
-DOCS_INPUT = pathUtil.join(APP_DIR, "src", "lib", "*")
-SRC_DIR = pathUtil.join(APP_DIR, "src")
-OUT_DIR = pathUtil.join(APP_DIR, "out")
-TEST_DIR = pathUtil.join(APP_DIR, "test")
-MODULES_DIR = pathUtil.join(APP_DIR, "node_modules")
-DOCPAD_DIR = pathUtil.join(MODULES_DIR, "docpad")
-BIN_DIR = pathUtil.join(MODULES_DIR, ".bin")
-GIT = "git"
-CAKE = pathUtil.join(BIN_DIR, "cake#{EXT}")
-COFFEE = pathUtil.join(BIN_DIR, "coffee#{EXT}")
-PROJECTZ = pathUtil.join(BIN_DIR, "projectz#{EXT}")
-DOCCO = pathUtil.join(BIN_DIR, "docco#{EXT}")
+WINDOWS = process.platform.indexOf('win') is 0
+NODE = process.execPath
+NPM = (if WINDOWS then process.execPath.replace('node.exe', 'npm.cmd') else 'npm')
+EXT = (if WINDOWS then '.cmd' else '')
+GIT = "git"
+
+APP_PATH = process.cwd()
+PACKAGE_PATH = pathUtil.join(APP_PATH, "package.json")
+PACKAGE_DATA = require(PACKAGE_PATH)
+
+MODULES_PATH = pathUtil.join(APP_PATH, "node_modules")
+DOCPAD_PATH = pathUtil.join(MODULES_PATH, "docpad")
+BIN_PATH = pathUtil.join(MODULES_PATH, ".bin")
+CAKE = pathUtil.join(BIN_PATH, "cake" + EXT)
+COFFEE = pathUtil.join(BIN_PATH, "coffee" + EXT)
+PROJECTZ = pathUtil.join(BIN_PATH, "projectz" + EXT)
+DOCCO = pathUtil.join(BIN_PATH, "docco" + EXT)
+DOCPAD = pathUtil.join(BIN_PATH, "docpad" + EXT)
+
+config = {}
+config.TEST_PATH = "test"
+config.DOCCO_SRC_PATH = null
+config.DOCCO_OUT_PATH = "docs"
+config.COFFEE_SRC_PATH = "src" # eventually we'll set this to null, right now it isn't for b/c compat
+config.COFFEE_OUT_PATH = "out"
+config.DOCPAD_SRC_PATH = null
+config.DOCPAD_OUT_PATH = "out"
+
+for own key,value of (PACKAGE_DATA.cakeConfiguration or {})
+ config[key] = value
+
+for own key,value of config
+ config[key] = pathUtil.resolve(APP_PATH, value) if value
# =====================================
# Generic
-{exec,spawn} = require('child_process')
+{spawn, exec} = require('child_process')
safe = (next,fn) ->
fn ?= next # support only one argument
return (err) ->
@@ -65,9 +78,10 @@ finish = (err) ->
actions =
clean: (opts,next) ->
+ # Prepare
(next = opts; opts = {}) unless next?
- args = ['-Rf', OUT_DIR]
- for path in [APP_DIR, TEST_DIR]
+ args = ['-Rf', config.COFFEE_COFFEE_OUT_PATH]
+ for path in [APP_PATH, config.TEST_PATH]
args.push(
pathUtil.join(path, 'build')
pathUtil.join(path, 'components')
@@ -76,79 +90,138 @@ actions =
pathUtil.join(path, '*out')
pathUtil.join(path, '*log')
)
+
# rm
- spawn('rm', args, {stdio:'inherit', cwd:APP_DIR}).on('close', safe next)
+ console.log('clean')
+ spawn('rm', args, {stdio:'inherit', cwd:APP_PATH}).on('close', safe next)
install: (opts,next) ->
+ # Prepare
(next = opts; opts = {}) unless next?
+
+ # Steps
step1 = ->
- # npm install (for app)
- spawn(NPM, ['install'], {stdio:'inherit', cwd:APP_DIR}).on('close', safe next, step2)
+ console.log('npm install (for app)')
+ spawn(NPM, ['install'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step2)
step2 = ->
- fsUtil.exists TEST_DIR, (exists) ->
- return next() unless exists
- # npm install (for test)
- spawn(NPM, ['install'], {stdio:'inherit', cwd:TEST_DIR}).on('close', safe next, step3)
+ return step3() if !config.TEST_PATH or !fsUtil.existsSync(config.TEST_PATH)
+ console.log('npm install (for test)')
+ spawn(NPM, ['install'], {stdio:'inherit', cwd:config.TEST_PATH}).on('close', safe next, step3)
step3 = ->
- fsUtil.exists DOCPAD_DIR, (exists) ->
- return next() unless exists
- # npm install (for test)
- spawn(NPM, ['install'], {stdio:'inherit', cwd:DOCPAD_DIR}).on('close', safe next)
+ return step4() if !fsUtil.existsSync(DOCPAD_PATH)
+ console.log('npm install (for docpad tests)')
+ spawn(NPM, ['install'], {stdio:'inherit', cwd:DOCPAD_PATH}).on('close', safe next, step4)
+ step4 = next
+
+ # Start
step1()
compile: (opts,next) ->
+ # Prepare
(next = opts; opts = {}) unless next?
- # cake install
- actions.install opts, safe next, ->
- # coffee compile
- spawn(COFFEE, ['-co', OUT_DIR, SRC_DIR], {stdio:'inherit', cwd:APP_DIR}).on('close', safe next)
+
+ # Steps
+ step1 = ->
+ console.log('cake install')
+ actions.install(opts, safe next, step2)
+ step2 = ->
+ return step3() if !config.COFFEE_SRC_PATH or !fsUtil.existsSync(COFFEE)
+ console.log('coffee compile')
+ spawn(COFFEE, ['-co', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3)
+ step3 = ->
+ return step4() if !config.DOCPAD_SRC_PATH or !fsUtil.existsSync(DOCPAD)
+ console.log('docpad generate')
+ spawn(DOCPAD, ['generate'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step4)
+ step4 = next
+
+ # Start
+ step1()
watch: (opts,next) ->
+ # Prepare
(next = opts; opts = {}) unless next?
- # cake install
- actions.install opts, safe next, ->
- # coffee watch
- spawn(COFFEE, ['-wco', OUT_DIR, SRC_DIR], {stdio:'inherit', cwd:APP_DIR}).on('close', safe next)
+
+ # Steps
+ step1 = ->
+ console.log('cake install')
+ actions.install(opts, safe next, step2)
+ step2 = ->
+ return step3() if !config.COFFEE_SRC_PATH or !fsUtil.existsSync(COFFEE)
+ console.log('coffee watch')
+ spawn(COFFEE, ['-wco', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3)
+ step3 = ->
+ return step4() if !config.DOCPAD_SRC_PATH or !fsUtil.existsSync(DOCPAD)
+ console.log('docpad run')
+ spawn(DOCPAD, ['run'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step4)
+ step4 = next
+
+ # Start
+ step1()
test: (opts,next) ->
+ # Prepare
(next = opts; opts = {}) unless next?
- # cake compile
- actions.compile opts, safe next, ->
- # npm test
- spawn(NPM, ['test'], {stdio:'inherit', cwd:APP_DIR}).on('close', safe next)
+
+ # Steps
+ step1 = ->
+ console.log('cake compile')
+ actions.compile(opts, safe next, step2)
+ step2 = ->
+ console.log('npm test')
+ spawn(NPM, ['test'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3)
+ step3 = next
+
+ # Start
+ step1()
prepublish: (opts,next) ->
+ # Prepare
(next = opts; opts = {}) unless next?
+
+ # Steps
step1 = ->
- # cake compile
+ console.log('cake compile')
actions.compile(opts, safe next, step2)
step2 = ->
- # project compile
- fsUtil.exists PROJECTZ, (exists) ->
- return step3() unless exists
- spawn(PROJECTZ, ['compile'], {stdio:'inherit', cwd:APP_DIR}).on('close', safe next, step3)
+ return step3() if !fsUtil.existsSync(PROJECTZ)
+ console.log('projectz compile')
+ spawn(PROJECTZ, ['compile'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3)
step3 = ->
- # docco compile
- fsUtil.exists DOCCO, (exists) ->
- return step4() unless exists
- exec("#{DOCCO} -o #{DOCS_DIR} #{DOCS_INPUT}", {stdio:'inherit', cwd:APP_DIR}, safe next, step4)
+ return step4() if !config.DOCCO_SRC_PATH or !fsUtil.existsSync(DOCCO)
+ console.log('docco compile')
+ exec("#{DOCCO} -o #{config.DOCCO_OUT_PATH} #{config.DOCCO_SRC_PATH}", {stdio:'inherit', cwd:APP_PATH}, safe next, step4)
step4 = ->
- # npm test
- actions.test(opts, safe next)
+ console.log('cake test')
+ actions.test(opts, safe next, step5)
+ step5 = next
+
+ # Start
step1()
publish: (opts,next) ->
+ # Prepare
(next = opts; opts = {}) unless next?
- # cake prepublish
- actions.prepublish opts, safe next, ->
- # npm publish
- spawn(NPM, ['publish'], {stdio:'inherit', cwd:APP_DIR}).on 'close', safe next, ->
- # git tag
- spawn(GIT, ['tag', 'v'+PACKAGE_DATA.version, '-a'], {stdio:'inherit', cwd:APP_DIR}).on 'close', safe next, ->
- # git push origin master
- spawn(GIT, ['push', 'origin', 'master'], {stdio:'inherit', cwd:APP_DIR}).on 'close', safe next, ->
- # git push tags
- spawn(GIT, ['push', 'origin', '--tags'], {stdio:'inherit', cwd:APP_DIR}).on('close', safe next)
+
+ # Steps
+ step1 = ->
+ console.log('cake prepublish')
+ actions.prepublish(opts, safe next, step2)
+ step2 = ->
+ console.log('npm publish')
+ spawn(NPM, ['publish'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3)
+ step3 = ->
+ console.log('git tag')
+ spawn(GIT, ['tag', 'v'+PACKAGE_DATA.version, '-a'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step4)
+ step4 = ->
+ console.log('git push origin master')
+ spawn(GIT, ['push', 'origin', 'master'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step5)
+ step5 = ->
+ console.log('git push tags')
+ spawn(GIT, ['push', 'origin', '--tags'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step6)
+ step6 = next
+
+ # Start
+ step1()
# =====================================
View
3  History.md → HISTORY.md
@@ -1,5 +1,8 @@
# History
+- v6.57.2 December 12, 2013
+ - Updated dependencies
+
- v6.57.1 December 9, 2013
- Fixed delay of requests not working when documents are still performing their initial generation (regression since v6.57.0)
View
7 README.md
@@ -101,7 +101,7 @@ Here are some quick links to help you get started:
<!-- HISTORY/ -->
## History
-[Discover the change history by heading on over to the `History.md` file.](https://github.com/bevry/docpad/blob/master/History.md#files)
+[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/docpad/blob/master/HISTORY.md#files)
<!-- /HISTORY -->
@@ -110,7 +110,7 @@ Here are some quick links to help you get started:
## Contribute
-[Discover how you can contribute by heading on over to the `Contributing.md` file.](https://github.com/bevry/docpad/blob/master/CONTRIBUTING.md)
+[Discover how you can contribute by heading on over to the `CONTRIBUTING.md` file.](https://github.com/bevry/docpad/blob/master/CONTRIBUTING.md#files)
<!-- /CONTRIBUTE -->
@@ -164,6 +164,7 @@ These amazing people have contributed code to this project:
- Paul Armstrong <paul@paularmstrongdesigns.com> (https://github.com/paularmstrong) - [view contributions](https://github.com/bevry/docpad/commits?author=paularmstrong)
- pflannery (https://github.com/pflannery) - [view contributions](https://github.com/bevry/docpad/commits?author=pflannery)
- Richard A <richard@antecki.id.au> (https://github.com/rantecki) - [view contributions](https://github.com/bevry/docpad/commits?author=rantecki)
+- ruemic (https://github.com/ruemic) - [view contributions](https://github.com/bevry/docpad/commits?author=ruemic)
- Sorin Ionescu <sorin.ionescu@gmail.com> (https://github.com/sorin-ionescu) - [view contributions](https://github.com/bevry/docpad/commits?author=sorin-ionescu)
- Stefan (https://github.com/stegrams) - [view contributions](https://github.com/bevry/docpad/commits?author=stegrams)
- Sven Vetsch (https://github.com/disenchant) - [view contributions](https://github.com/bevry/docpad/commits?author=disenchant)
@@ -173,7 +174,7 @@ These amazing people have contributed code to this project:
- Vladislav Botvin <darkvlados@me.com> (https://github.com/darrrk) - [view contributions](https://github.com/bevry/docpad/commits?author=darrrk)
- Zhao Lei <aicoylei@gmail.com> (https://github.com/firede) - [view contributions](https://github.com/bevry/docpad/commits?author=firede)
-[Become a contributor!](https://github.com/bevry/docpad/blob/master/CONTRIBUTING.md)
+[Become a contributor!](https://github.com/bevry/docpad/blob/master/CONTRIBUTING.md#files)
<!-- /BACKERS -->
View
13 package.json
@@ -1,7 +1,7 @@
{
"title": "DocPad. Streamlined web development.",
"name": "docpad",
- "version": "6.57.1",
+ "version": "6.57.2",
"description": "DocPad is a next generation web architecture that lets you create fast static websites with dynamic abilities and powerful abstractions. Write your website as files on your computer, entries in a database, or even RSS feeds and DocPad will import it, generate & render it, then output a static website for deployment anywhere or a dynamic node website for advanced server-side functionality. Use it as a module or standalone. It's purely awesome. Check it out.",
"homepage": "http://docpad.org",
"installUrl": "http://docpad.org/install",
@@ -82,6 +82,7 @@
"Paul Armstrong <paul@paularmstrongdesigns.com> (https://github.com/paularmstrong)",
"pflannery (https://github.com/pflannery)",
"Richard A <richard@antecki.id.au> (https://github.com/rantecki)",
+ "ruemic (https://github.com/ruemic)",
"Sorin Ionescu <sorin.ionescu@gmail.com> (https://github.com/sorin-ionescu)",
"Stefan (https://github.com/stegrams)",
"Sven Vetsch (https://github.com/disenchant)",
@@ -105,7 +106,7 @@
"dependencies": {
"ambi": "~2.1.6",
"backbone": "1.1.0",
- "bal-util": "~2.3.2",
+ "bal-util": "~2.4.0",
"caterpillar": "~2.0.6",
"caterpillar-filter": "~2.0.3",
"caterpillar-human": "~2.1.1",
@@ -118,10 +119,11 @@
"extendr": "~2.1.0",
"extract-opts": "~2.2.0",
"getmac": "~1.0.6",
+ "ignorefs": "~1.0.0",
"jschardet": "~1.1.0",
"encoding": "~0.1.6",
"lazy-require": "~1.0.0",
- "lodash": "~2.3.0",
+ "lodash": "~2.4.1",
"mime": "~1.2.9",
"progressbar": "~1.0.3",
"query-engine": "~1.5.5",
@@ -133,14 +135,15 @@
"typechecker": "~2.0.8",
"watchr": "~2.4.4",
"yamljs": "~0.1.4",
- "promptly": "~0.2.0"
+ "promptly": "~0.2.0",
+ "istextorbinary": "~1.0.0"
},
"devDependencies": {
"coffee-script": "~1.6.2",
"chai": "~1.8.1",
"joe": "~1.3.2",
"joe-reporter-console": "~1.2.1",
- "projectz": "~0.2.6"
+ "projectz": "~0.3.0"
},
"directories": {
"lib": "./out/lib"
View
3  src/lib/docpad.coffee
@@ -41,6 +41,7 @@ if ('--profile' in process.argv)
_ = require('lodash')
CSON = require('cson')
balUtil = require('bal-util')
+ignorefs = require('ignorefs')
extendr = require('extendr')
eachr = require('eachr')
typeChecker = require('typechecker')
@@ -1344,7 +1345,7 @@ class DocPad extends EventEmitterGrouped
# Is Ignored Path
isIgnoredPath: (path,opts={}) ->
opts = extendr.extend(@getIgnoreOpts(), opts)
- return balUtil.isIgnoredPath(path, opts)
+ return ignorefs.isIgnoredPath(path, opts)
# Scan Directory
scandir: (opts={}) ->
View
3  src/lib/interfaces/console.coffee
@@ -1,6 +1,5 @@
# Requires
pathUtil = require('path')
-balUtil = require('bal-util')
safefs = require('safefs')
safeps = require('safeps')
{TaskGroup} = require('taskgroup')
@@ -434,7 +433,7 @@ class ConsoleInterface
userConfig.subscribed = false
docpad.updateUserConfig (err) ->
return complete(err) if err
- balUtil.wait(2000,complete)
+ setTimeout(complete, 2000)
return
# Scan configuration to speed up the process
View
4 src/lib/models/file.coffee
@@ -1,6 +1,6 @@
# Import
pathUtil = require('path')
-balUtil = require('bal-util')
+isTextOrBinary = require('istextorbinary')
typeChecker = require('typechecker')
{TaskGroup} = require('taskgroup')
safefs = require('safefs')
@@ -621,7 +621,7 @@ class FileModel extends Model
# Detect Encoding
if buffer and encoding? is false or opts.reencode is true
- isText = balUtil.isTextSync(relativePath, buffer)
+ isText = isTextOrBinary.isTextSync(relativePath, buffer)
# Text
if isText is true
Please sign in to comment.
Something went wrong with that request. Please try again.