Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

unmaintained browserify support (I'm not testing against this for now)

  • Loading branch information...
commit 0a68782f8961761ca989f8cd405046dc50108724 1 parent eaa4910
@sirlantis authored
Showing with 17 additions and 7 deletions.
  1. +2 −1  .gitignore
  2. +5 −0 Cakefile
  3. +10 −6 src/index.coffee
View
3  .gitignore
@@ -1,2 +1,3 @@
node_modules
-lib
+lib
+dist/*
View
5 Cakefile
@@ -1,7 +1,12 @@
{exec} = require 'child_process'
+fs = require 'fs'
task 'build', 'Build project from src/*.coffee to lib/*.js', ->
exec 'coffee --compile --output lib/ src/', (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr
+task 'browserify', 'Bundle project in a single .js file for use in browsers', ->
+ exec 'browserify lib/index.js -o dist/liquid.js', (err, stdout, stderr) ->
+ throw err if err
+ console.log stdout + stderr
View
16 src/index.coffee
@@ -24,7 +24,6 @@ Liquid.Error = customError "Error"
Liquid[className] = customError("Liquid.#{className}", Liquid.Error)
-
Liquid.Helpers = require("./liquid/helpers")
Liquid.Drop = require("./liquid/drop")
Liquid.Strainer = require("./liquid/strainer")
@@ -42,10 +41,15 @@ class Liquid.ElseCondition extends Liquid.Condition
Liquid.Template.registerFilter(Liquid.StandardFilters)
-[ "assign", "capture", "comment", "decrement",
- "for", "if", "ifchanged", "increment",
- "raw", "unless"
-].forEach (tag) ->
- require("./liquid/tags/#{tag}")
+require("./liquid/tags/assign")
+require("./liquid/tags/capture")
+require("./liquid/tags/comment")
+require("./liquid/tags/decrement")
+require("./liquid/tags/for")
+require("./liquid/tags/if")
+require("./liquid/tags/ifchanged")
+require("./liquid/tags/increment")
+require("./liquid/tags/raw")
+require("./liquid/tags/unless")
module.exports = Liquid
Please sign in to comment.
Something went wrong with that request. Please try again.