diff --git a/.travis.yml b/.travis.yml index 1b07f25..eea9712 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: + - "8" + - "7" - "6" - - "5" - - "4" notifications: email: false diff --git a/README.md b/README.md index eb1f3d0..2408ae0 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ Haiku9 (H9 for short) is a static site generator. H9 supports: -* Jade templates +* Pug templates * Markdown * Handlebars (via [Panda Template](https://github.com/pandastrike/panda-template)) -* CoffeeScript +* CoffeeScript v2 * Stylus * Image files @@ -125,13 +125,13 @@ docker run -it --rm -v "$PWD":/usr/src/app -v ~/.aws:/root/.aws h9 publish for item in asset.data.items markdown = (yield read item.source.path).split( "")[0] item.excerpt = marked markdown - jade asset + pug asset diff --git a/src/survey/index.coffee b/src/survey/index.coffee index dd586bd..e845815 100644 --- a/src/survey/index.coffee +++ b/src/survey/index.coffee @@ -1,7 +1,7 @@ require "./pass-thru" require "./image" require "./stylus" -require "./jade" +require "./pug" require "./handlebars" require "./coffee" require "./markdown" diff --git a/src/survey/markdown.coffee b/src/survey/markdown.coffee index 4ba38fc..4707098 100644 --- a/src/survey/markdown.coffee +++ b/src/survey/markdown.coffee @@ -2,7 +2,7 @@ marked = require "marked" {go, map, tee, reject, async, include, Type, isType, Method, glob, read} = require "fairmont" -{define, context, jade} = require "panda-9000" +{define, context, pug} = require "panda-9000" {save, render} = Asset = require "../asset" Data = require "../data" {pathWithUnderscore, isBowerComponentsPath} = require "../utils" @@ -29,7 +29,7 @@ Method.define render, (isType type), async (asset) -> asset.source.content = """ extends _layout block content - :markdown + :markdown-it #{markdown} """ - jade asset + pug asset diff --git a/src/survey/jade.coffee b/src/survey/pug.coffee similarity index 77% rename from src/survey/jade.coffee rename to src/survey/pug.coffee index 71d7c27..111cb17 100644 --- a/src/survey/jade.coffee +++ b/src/survey/pug.coffee @@ -3,17 +3,17 @@ include, Type, isType, isMatch, Method, glob} = require "fairmont" -{define, context, jade} = require "panda-9000" +{define, context, pug} = require "panda-9000" {save, render} = Asset = require "../asset" Data = require "../data" {pathWithUnderscore, isBowerComponentsPath} = require "../utils" type = Type.define Asset -define "survey/jade", ["data"], -> +define "survey/pug", ["data"], -> {source} = require "../configuration" go [ - glob "**/*.jade", source + glob "**/*.+(pug|jade)", source reject pathWithUnderscore reject isBowerComponentsPath map context source @@ -23,4 +23,4 @@ define "survey/jade", ["data"], -> tee save ] -Method.define render, (isType type), jade +Method.define render, (isType type), pug diff --git a/test/fixtures/jade/h9.yaml b/test/fixtures/pug/h9.yaml similarity index 100% rename from test/fixtures/jade/h9.yaml rename to test/fixtures/pug/h9.yaml diff --git a/test/fixtures/jade/www/index.jade b/test/fixtures/pug/www/index.pug similarity index 100% rename from test/fixtures/jade/www/index.jade rename to test/fixtures/pug/www/index.pug diff --git a/test/index.coffee b/test/index.coffee index 34059de..deedd86 100644 --- a/test/index.coffee +++ b/test/index.coffee @@ -4,7 +4,7 @@ if targets.length is 0 targets = [ "coffeescript" "handlebars" - "jade" + "pug" "json" "scss" "serve" diff --git a/test/jade_spec.coffee b/test/pug_spec.coffee similarity index 61% rename from test/jade_spec.coffee rename to test/pug_spec.coffee index e4a5152..0f4387c 100644 --- a/test/jade_spec.coffee +++ b/test/pug_spec.coffee @@ -3,5 +3,5 @@ Amen = require "amen" Amen.describe "Haiku9 static-site generation", (context) -> - context.test "Compiles Jade files", -> - yield buildAndVerify "jade", "index.html" + context.test "Compiles Pug files", -> + yield buildAndVerify "pug", "index.html" diff --git a/test/serve_spec.coffee b/test/serve_spec.coffee index e5f41f9..9ef445f 100644 --- a/test/serve_spec.coffee +++ b/test/serve_spec.coffee @@ -12,13 +12,13 @@ SERVE_STARTUP_TIMEOUT = 5000 Amen.describe "Haiku9 serve task", (context) -> context.test "Starts a local server on the default port", -> - # Build the jade fixture if needed - unless yield isBuilt "jade", "index.html" - yield build "jade" + # Build the pug fixture if needed + unless yield isBuilt "pug", "index.html" + yield build "pug" - # CD into the jade fixture to run it + # CD into the pug fixture to run it child = null - chdir join(__dirname, "fixtures", "jade"), -> + chdir join(__dirname, "fixtures", "pug"), -> child = childProcess.fork(SERVE_FILE) # Give the server a few seconds to spin up (but resolve immediately when you can)