Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

caveman

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caveman - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

8

caveman.js

@@ -104,2 +104,6 @@ /**

var isComment = function (str) {
return str && str.slice(0, 2) === '//';
};
var translateScript = function (str) {

@@ -165,3 +169,5 @@ str = str.substr(1).trim(); // remove dash character

code = expandShortcuts(code);
if (isScript(code)) {
if (isComment(code)) {
output += '';
} else if (isScript(code)) {
output += translateScript(code);

@@ -168,0 +174,0 @@ } else {

4

package.json

@@ -7,3 +7,3 @@ {

},
"version": "0.1.3",
"version": "0.1.4",
"main": "caveman.js",

@@ -18,3 +18,3 @@ "scripts": {

},
"dependencies": {
"devDependencies": {
"jasmine-node": "1.13.1"

@@ -21,0 +21,0 @@ },

@@ -11,3 +11,3 @@  

Caveman's markup language is built using an extensible macro system, which allows for arbitrary script execution, explicit logic, and partials. The library is lightweight (1kb compressed), has no dependencies, adds a single `Caveman` variable to the global namespace, and seems from [initial benchmark tests](#benchmarks) to be very fast, almost as fast as native JS concatenation.
Caveman's markup language is built using an extensible macro system, which allows for arbitrary script execution, explicit logic (instead of the bastardized "logic-less" logic of mustache/etc), and partials. The library is lightweight (1kb compressed), has no dependencies, adds a single `Caveman` variable to the global namespace, and seems from [initial benchmark tests](#benchmarks) to be very fast, almost as fast as native JS concatenation.

@@ -101,2 +101,24 @@ ## Installation

### 3. Server-side Compilation and Rendering
You can also use Caveman for static site generation. Let's assume you have your caveman templates in `./templates` and generated assets in `./public`. Using Grunt and [grunt-caveman](https://github.com/andrewchilds/grunt-caveman), configure your Caveman task like so:
```js
grunt.initConfig({
caveman: {
compile: {
src: ['templates/*.html'],
render: {
// 'homePage' equates to templates/homePage.html
'homePage': 'public/index.html',
'aboutPage': 'public/about/index.html',
'contactPage': 'public/contact/index.html'
}
}
}
});
grunt.loadNpmTasks('grunt-caveman');
```
## Concepts

@@ -389,3 +411,3 @@

`with` allows you to scope an object to `d` (or to anything, using `with foo as bar`) within a block.
`with` allows you to scope an object to `d` (or to a named variable using `with foo as bar`) within a block.

@@ -399,7 +421,2 @@ ```html

{{- end }}
<!-- rendered HTML -->
<div>1 x 1 = 1</div>
<div>2 x 2 = 4</div>
<div>3 x 3 = 9</div>
```

@@ -603,2 +620,2 @@

MIT. Copyright &copy; 2014 Andrew Childs
MIT. Copyright &copy; 2015 Andrew Childs

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