forked from yui/yui3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Getting build files, Makefile, etc. in place to import Handlebars.
- Loading branch information
Showing
16 changed files
with
312 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Handlebars Change History | ||
========================= | ||
|
||
3.5.0 | ||
----- | ||
|
||
* Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright (C) 2011 by Yehuda Katz | ||
<https://github.com/wycats/handlebars.js> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# -- Constants ----------------------------------------------------------------- | ||
|
||
# Path to the "lib" directory of a Handlebars.js git checkout. | ||
HANDLEBARS_LIB = $(PWD)/../../../handlebars.js/lib | ||
|
||
# Path to which YUI Handlebars source files should be written. | ||
OUTPUT_DIR = $(PWD)/js | ||
|
||
# Comment to prepend to the imported source files. | ||
PREPEND_COMMENT = /* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */\n | ||
|
||
# Files that make up the handlebars-base module. | ||
BASE_FILES = \ | ||
$(HANDLEBARS_LIB)/handlebars/base.js \ | ||
$(HANDLEBARS_LIB)/handlebars/utils.js \ | ||
$(HANDLEBARS_LIB)/handlebars/vm.js | ||
|
||
# Files that make up the handlebars-compiler module. | ||
COMPILER_FILES = \ | ||
$(HANDLEBARS_LIB)/handlebars/compiler/parser.js \ | ||
$(HANDLEBARS_LIB)/handlebars/compiler/base.js \ | ||
$(HANDLEBARS_LIB)/handlebars/compiler/ast.js \ | ||
$(HANDLEBARS_LIB)/handlebars/compiler/compiler.js | ||
|
||
# -- Targets ------------------------------------------------------------------- | ||
|
||
BASE_TARGETS = $(addprefix $(OUTPUT_DIR)/handlebars-, $(notdir $(BASE_FILES))) | ||
COMPILER_TARGETS = $(addprefix $(OUTPUT_DIR)/handlebars-compiler-, $(notdir $(COMPILER_FILES))) | ||
|
||
# target: all - Default target. | ||
all: import-base import-compiler | ||
|
||
# target: clean - Removes imported source files. | ||
clean: | ||
rm -f $(BASE_TARGETS) $(COMPILER_TARGETS) | ||
|
||
# target: import-base - Imports the source files that make up handlebars-base. | ||
import-base: $(BASE_TARGETS) | ||
|
||
# target: import-compiler - Imports the source files that make up handlebars-compiler. | ||
import-compiler: $(COMPILER_TARGETS) | ||
|
||
# target: help - Displays help. | ||
help: | ||
@egrep "^# target:" Makefile | ||
|
||
$(OUTPUT_DIR)/handlebars-%.js: $(HANDLEBARS_LIB)/handlebars/%.js | ||
@echo "$(notdir $@)" | ||
@echo "$(PREPEND_COMMENT)" > $@ | ||
@sed -n '/^\/\/ BEGIN(BROWSER)$$/,/^\/\/ END(BROWSER)$$/p' $< >> $@ | ||
|
||
$(OUTPUT_DIR)/handlebars-compiler-%.js: $(HANDLEBARS_LIB)/handlebars/compiler/%.js | ||
@echo "$(notdir $@)" | ||
@echo "$(PREPEND_COMMENT)" > $@ | ||
@sed -n '/^\/\/ BEGIN(BROWSER)$$/,/^\/\/ END(BROWSER)$$/p' $< >> $@ | ||
|
||
$(OUTPUT_DIR)/handlebars-compiler-parser.js: $(HANDLEBARS_LIB)/handlebars/compiler/parser.js | ||
@echo "$(notdir $@)" | ||
@echo "$(PREPEND_COMMENT)" > $@ | ||
@cat $< >> $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Handlebars | ||
========== | ||
|
||
Handlebars is a simple template language inspired by Mustache. This is a YUI | ||
port of the original Handlebars project, which can be found at | ||
<https://github.com/wycats/handlebars.js>. | ||
|
||
|
||
License | ||
======= | ||
|
||
Copyright (C) 2011 by Yehuda Katz | ||
<https://github.com/wycats/handlebars.js> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
builddir=../../../builder/componentbuild | ||
srcdir=../.. | ||
|
||
component=handlebars-base | ||
component.jsfiles=handlebars-copyright.js, handlebars-base.js, handlebars-utils.js, handlebars-vm.js | ||
component.requires=escape |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="YUI" default="local"> | ||
<property environment="env" /> | ||
<property file="build-handlebars-base.properties" /> | ||
<import file="${builddir}/3.x/bootstrap.xml" | ||
description="Default Build Properties and Targets" /> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
builddir=../../../builder/componentbuild | ||
srcdir=../.. | ||
|
||
component=handlebars-compiler | ||
component.jsfiles=handlebars-copyright.js, handlebars-compiler-parser.js, handlebars-compiler-base.js, handlebars-compiler-ast.js, handlebars-compiler-compiler.js | ||
component.requires=yui-base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="YUI" default="local"> | ||
<property environment="env" /> | ||
<property file="build-handlebars-compiler.properties" /> | ||
<import file="${builddir}/3.x/bootstrap.xml" | ||
description="Default Build Properties and Targets" /> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="YUI" default="local"> | ||
<description>Handlebars - Build All Modules</description> | ||
|
||
<macrodef name="build-handlebars"> | ||
<attribute name="target"/> | ||
<sequential> | ||
<subant target="@{target}"> | ||
<fileset dir="." includes="build-*.xml"/> | ||
</subant> | ||
</sequential> | ||
</macrodef> | ||
|
||
<target name="local"> | ||
<build-handlebars target="local"/> | ||
</target> | ||
<target name="deploy"> | ||
<build-handlebars target="deploy"/> | ||
</target> | ||
<target name="all"> | ||
<build-handlebars target="all"/> | ||
</target> | ||
<target name="clean"> | ||
<build-handlebars target="clean"/> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name" : "handlebars", | ||
"displayName": "Handlebars", | ||
"description": "A simple template language inspired by Mustache.", | ||
"author" : ["rgrove"], | ||
|
||
"tags": [ | ||
"utility", "beta", "template", "templating", "mustache", "view" | ||
], | ||
|
||
"use": ["handlebars"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="intro"> | ||
<p> | ||
Handlebars is a simple template language inspired by Mustache. This is a YUI port of the <a href="https://github.com/wycats/handlebars.js">original Handlebars project</a>. | ||
</p> | ||
</div> | ||
|
||
{{>getting-started}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/*! | ||
Handlebars.js - Copyright (C) 2011 Yehuda Katz | ||
https://raw.github.com/rgrove/handlebars.js/master/LICENSE | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"handlebars": { | ||
"use": ["handlebars-base", "handlebars-compiler"], | ||
|
||
"submodules": { | ||
"handlebars-base": { | ||
"requires": ["escape"] | ||
}, | ||
|
||
"handlebars-compiler": { | ||
"requires": ["yui-base"] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
YUI.add('handlebars-test', function (Y) { | ||
|
||
var Assert = Y.Assert, | ||
|
||
suite; | ||
|
||
suite = new Y.Test.Suite({ | ||
name: 'Handlebars', | ||
|
||
setUp: function () { | ||
}, | ||
|
||
tearDown: function () { | ||
} | ||
}); | ||
|
||
// -- Lifecycle ---------------------------------------------------------------- | ||
suite.add(new Y.Test.Case({ | ||
name: 'Lifecycle', | ||
|
||
setUp: function () { | ||
}, | ||
|
||
tearDown: function () { | ||
} | ||
})); | ||
|
||
Y.Test.Runner.add(suite); | ||
|
||
}, '@VERSION@', { | ||
requires: ['handlebars', 'test'] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Test Page</title> | ||
</head> | ||
<body class="yui3-skin-sam"> | ||
|
||
<div id="log"></div> | ||
|
||
<script src="../../../build/yui/yui.js"></script> | ||
<script> | ||
var Y = YUI({ | ||
allowRollup: false, | ||
filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'min', | ||
modules: { | ||
'test-console': { | ||
fullpath : '../../common/tests/assets/test-console.js', | ||
requires : ['console-filters'], | ||
skinnable: true | ||
}, | ||
|
||
'skin-sam-test-console': { | ||
fullpath: '../../common/tests/assets/test-console.css', | ||
type : 'css' | ||
}, | ||
|
||
'handlebars-test': { | ||
fullpath: 'handlebars-test.js', | ||
requires: ['handlebars', 'test'] | ||
} | ||
}, | ||
useBrowserConsole: false | ||
}).use('handlebars-test', 'test-console', function (Y) { | ||
Y.Test.Runner.run(); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |