Socket
Socket
Sign inDemoInstall

htmlbars

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmlbars - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.bowerrc

24

ARCHITECTURE.md

@@ -22,4 +22,4 @@ The process of converting a string template into a fully compiled

only needs to ever be called once), clones the fragment,
then calls `hydrate` and and loops through each mustache,
passing each to runtime helpers `RESOLVE` or `ATTRIBUTE`
then calls `hydrate` and loops through each mustache,
passing each to runtime helpers `resolve` or `attribute`
which can be overridden to perform data-binding, invoke

@@ -34,3 +34,3 @@ user-defined helpers, etc.

4. Build up hydrating function from the HTMLBars AST.
5. Generate the final template code performs the basic cloning logic,
5. Generate the final template code that performs the basic cloning logic,
invokes `build` and `hydrate`, and loops through each mustache.

@@ -66,4 +66,3 @@

See [parser.js](lib/htmlbars/parser.js) and
[process-token.js](lib/htmlbars/html-parser/process-token.js).
See [parser.js](packages/htmlbars-compiler/lib/parser.js)

@@ -77,3 +76,3 @@ ### 2. Convert to HTMLBars AST

1. The there are AST nodes for every DOM element
1. There are AST nodes for every DOM element
2. The mustaches are distinguished between whether they occur

@@ -87,11 +86,11 @@ a) within an element's content (e.g. `<p>Hello {{name}}!</p>`),

HTMLElement tag='p' attributes=[['class', ['user ', Mustache(`user.cssClass`)]]]
Element tag='p' attributes=[Attr('class', Mustache(`concat "user " user.cssClass`))]
"User: "
Mustache(`user.name`)
" "
HTMLElement tag='button' helpers=[Mustache(`onclick "like"`)]
Element tag='button' helpers=[Mustache(`onclick "like"`)]
"Like"
See [parser.js](lib/htmlbars/parser.js) and
[ast.js](lib/htmlbars/ast.js).
See [parser.js](packages/htmlbars-compiler/lib/parser.js) and
[ast.js](packages/htmlbars-compiler/lib/ast.js).

@@ -157,7 +156,7 @@ ### 3. Build document fragment generator from HTMLbars AST

1. In [fragment_opcode.js](lib/compiler/fragment_opcode.js),
1. In [fragment_opcode.js](packages/htmlbars-compiler/lib/compiler/fragment_opcode.js),
the HTMLbars AST is recursively walked and a flattened
array of opcodes (used in step 2) is generated.
The intent of this phase is to flatten the recursive structure of the
AST so that so recursion need take place in our compiled
AST so that no recursion need take place in our compiled
template (recursion leads to deep object graphs, clunky GC, etc)

@@ -172,2 +171,1 @@ 2. This opcodes array is then passed to `lib/compiler/fragment.js` which

TODO: this.
{
"name": "htmlbars",
"version": "0.1.0",
"version": "0.1.1",
"description": "HTMLBars compiles Handlebars templates into document fragments rather than string buffers",
"main": "index.js",
"main": "dist/cjs/htmlbars.js",
"scripts": {
"test": "./node_modules/grunt-cli/bin/grunt test"
"prepublish": "bower install",
"build": "bin/build.js",
"pretest": "bin/build.js",
"test": "bin/run-tests.js",
"start": "broccoli serve"
},

@@ -16,16 +20,27 @@ "repository": {

"readmeFilename": "README.md",
"dependencies": {
"handlebars": "1.3.0",
"broccoli-funnel": "^0.1.6"
},
"devDependencies": {
"grunt": "~0.4.2",
"grunt-cli": "~0.1.11",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-connect": "~0.6.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-qunit": "~0.3.0",
"grunt-es6-module-transpiler": "~0.6.0",
"grunt-concat-sourcemap": "~0.4.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-jshint": "~0.8.0",
"connect-redirection": "0.0.1"
"bower": "~1.3.3",
"broccoli": "0.12.0",
"broccoli-cli": "0.0.1",
"broccoli-concat": "0.0.6",
"broccoli-es6-module-transpiler": "~0.1.0",
"broccoli-export-tree": "~0.3.0",
"broccoli-file-mover": "0.3.5",
"broccoli-file-remover": "~0.2.2",
"broccoli-jshint": "~0.5.3",
"broccoli-merge-trees": "0.2.1",
"broccoli-string-replace": "~0.0.2",
"broccoli-uglify-js": "~0.1.3",
"chalk": "~0.4.0",
"copy-dereference": "~1.0.0",
"handlebars": "1.3.0",
"ncp": "~0.5.1",
"qunit": "^0.7.2",
"rimraf": "~2.2.8",
"rsvp": "~3.0.6"
}
}

@@ -16,4 +16,4 @@ # Status [![Build Status](https://travis-ci.org/tildeio/htmlbars.png)](https://travis-ci.org/tildeio/htmlbars)

Handlebars that can work directly against DOM nodes and doesn't
need special tags in the String for the data binding code can
find (a major limitation in Ember).
need special tags in the String for the data binding code to work
(a major limitation in Ember).

@@ -28,4 +28,29 @@ There are also many performance gains in HTMLBars' approach to building

Until then, check out [ARCHITECTURE.md](ARCHITECTURE.md) for
info on how HTMLBars is structured and its approach to efficiently
building / emitting DOM.
info on how HTMLBars is structured and its approach to efficiently building / emitting DOM.
# Building HTMLBars
1. Ensure that [Node.js](http://nodejs.org/) is installed.
2. Run `npm install` to ensure the required dependencies are installed.
3. Run `npm run-script build` to build HTMLBars. The builds will be placed in the `dist/` directory.
# How to Run Tests
## Via testem
[Testem](https://github.com/airportyh/testem) is a tool for running tests against
multiple launchers. For instance, Chrome and PhantomJS.
1. Install Testem: `npm install -g testem`
2. Run testem: `testem` or run Testem with specific browers: `testem -l Safari,Firefox`
Testem is a CI tool, so it will run tests as you change files.
## On the console with PhantomJS
1. Run `npm test`.
## In a browser
1. Run `npm start`.
2. Visit <http://localhost:4200/test>.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc