Skip to content

Commit

Permalink
Updates for DocPad 6.3
Browse files Browse the repository at this point in the history
Changes plugins:
- associated-files
- cleanurls
- coffee
- live-reload
- sass
- stylus

Moved unstable plugins into new plugins-dev folder instead.
  • Loading branch information
balupton committed Jul 16, 2012
1 parent e6586eb commit d7af205
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
.git*
.travis*
*.md
Makefile

src/
out/test/
test/
Empty file added History.md
Empty file.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# If you change something here, be sure to change it in package.json's scripts as well

dev:
./node_modules/.bin/coffee -w -o out/ -c src/

compile:
./node_modules/.bin/coffee -o out/ -c src/

.PHONY: dev compile
48 changes: 48 additions & 0 deletions out/heroku.plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "docpad-plugin-heroku",
"version": "2.0.0",
"description": "Deploy to Heroku easily and effortlessly with this DocPad plugin",
"homepage": "https://github.com/bevry/docpad-extras",
"keywords": [
"docpad",
"docpad-plugin",
"heroku",
"deploy",
"deployment"
],
"author": "Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",
"maintainers": [
"Benjamin Lupton <b@lupton.cc> (http://balupton.com)"
],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (http://balupton.com)"
],
"bugs": {
"url": "https://github.com/bevry/docpad-extras/issues"
},
"repository" : {
"type": "git",
"url": "http://github.com/bevry/docpad-extras.git"
},
"engines" : {
"node": ">=0.4.0",
"docpad": "6.x"
},
"dependencies": {
"bal-util": "1.12.x"
},
"devDependencies": {
"coffee-script": "1.3.x"
},
"main": "./out/heroku.plugin.js"
}
53 changes: 53 additions & 0 deletions src/heroku.plugin.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Export Plugin
module.exports = (BasePlugin) ->
# Define Plugin
class HerokuPlugin extends BasePlugin
# Plugin name
name: "heroku"

# Files
files:
"config.json": """
{"version":"latest"}
"""

"Procfile": """
web: node server.js
"""

"server.js": """
require('docpad').createInstance(function(err,docpadInstance){
if (err) return console.log(err.stack);
docpadInstance.action('generate server',function(err){
if (err) return console.log(err.stack);
console.log('OK');
});
});
"""

# Setup the Console Interface
consoleSetup: (opts,next) ->
# Prepare
{docpadInterface,commanderInstance} = opts

# Extend the CLI
program
.command('heroku ')
.description("deploy to heroku")
.action (command) ->
docpadInterface.applyConfiguration(command)
me.question(opts,docpadInterface.actionCompleted)

# Done, return back to DocPad
return next()


# Ask the user a question
question: (opts,next) ->
# Prepare
{docpadInterface,program} = opts

# Get username
program.promptSingleLine 'Type something?\n> ', (input) ->
console.log "You typed: #{input}"
next()

0 comments on commit d7af205

Please sign in to comment.