New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

terraform

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terraform - npm Package Compare versions

Comparing version 0.6.2 to 0.7.0

63

lib/helpers/raw.js

@@ -1,2 +0,1 @@

var path = require('path')

@@ -351,2 +350,5 @@ var fs = require('fs')

*
* allowAlternateExtensions: true. May be turned off for one less RegExp execution
* (and faster performance)
*
* eg.

@@ -357,37 +359,28 @@ * foo.jade => foo.html

var outputPath = exports.outputPath = function(source){
var arr = source.split(".")
if(arr.length >= 3){
/**
* same as...
*
* source = source.replace(/.md$/, "")
* source = source.replace(/.jade$/, "")
* source = source.replace(/.less$/, "")
*
*/
for(var type in processors){
processors[type].forEach(function(processor){
var regexp = new RegExp('.' + processor + '$')
source = source.replace(regexp, "")
var outputPath = exports.outputPath = function(source, allowAlternateExtensions){
if (allowAlternateExtensions == undefined) {
allowAlternateExtensions = true;
}
for(var targetExtension in processors){ // .html, .css, .js
if (processors.hasOwnProperty(targetExtension)) {
processors[targetExtension].forEach(function(sourceExtension){ // .jade, .ejs, .md
if (allowAlternateExtensions) {
// Search for a alternate extension before the known source extension e.g. foobar.bar.jade
var alternateFileExtension = new RegExp("^.*\\.(\\w{3,4})\\." + sourceExtension + "$")
var match = alternateFileExtension.exec(source)
if (match) {
// If found, replace the target extension with the alternate
targetExtension = match[1]
}
}
// Let's try to match known sourceExtensions. Optionally, capture the targetExtension BEFORE.
var regexp = new RegExp('(\\.' + targetExtension + ')?\\.' + sourceExtension + '$')
// If found, will replace the whole extension with target extension, e.g.:
// .html.jade -> .html (matches)
// .jade -> .html (matches)
// .html -> .html (doesn't matches - doesn't matter)
// .foo -> .foo (doesn't matches - doesn't matter)
source = source.replace(regexp, "." + targetExtension)
})
}
}else{
/**
* same as...
*
* source = source.replace(/.jade$/, ".html")
* source = source.replace(/.md$/, ".html")
* source = source.replace(/.less$/, ".css")
*/
for(var type in processors){
processors[type].forEach(function(processor){
var regexp = new RegExp('.' + processor + '$')
source = source.replace(regexp, "." + type)
})
}
}

@@ -435,3 +428,3 @@

// create array out of path
var arr = filePath.split("/")
var arr = filePath.split(path.sep)

@@ -438,0 +431,0 @@ // test for starting underscore

@@ -1,2 +0,2 @@

var marked = require("marked").setOptions({ langPrefix: 'language-' })
var marked = require("marked").setOptions({ langPrefix: 'language-', headerPrefix: '' })
var TerraformError = require("../../error").TerraformError

@@ -9,3 +9,3 @@

return function (locals){
return marked(fileContents.toString())
return marked(fileContents.toString().replace(/^\uFEFF/, ''))
}

@@ -12,0 +12,0 @@ },

{
"name": "terraform",
"version": "0.6.2",
"version": "0.7.0",
"description": "pre-processor engine that powers the harp web server",
"repository" : { "type" : "git", "url" : "https://github.com/sintaxi/terraform.git" },
"repository": {
"type": "git",
"url": "https://github.com/sintaxi/terraform.git"
},
"main": "./lib/terraform",

@@ -15,14 +18,17 @@ "scripts": {

{ "name": "Kenneth Ormandy", "email": "kenneth@chloi.io" },
{ "name": "Zhang Yichao", "email": "echaozh@gmail.com" }
{ "name": "Zhang Yichao", "email": "echaozh@gmail.com" },
{ "name": "Carlos Rodriguez" },
{ "name": "Zeke Sikelianos", "email": "zeke@sikelianos.com" },
{ "name": "Guilherme Rodrigues", "email": "gadr90@gmail.com" }
],
"license": "MIT",
"dependencies": {
"lru-cache" : "2.3.0",
"jade" : "0.35.0",
"coffee-script" : "1.6.3",
"ejs" : "0.8.4",
"node-sass": "0.7.0",
"lru-cache": "2.3.0",
"jade": "0.35.0",
"coffee-script": "1.7.1",
"ejs": "1.0.0",
"node-sass": "0.8.4",
"marked": "0.2.9",
"less" : "1.5.1",
"stylus": "0.40.0"
"less": "1.7.0",
"stylus": "0.42.3"
},

@@ -29,0 +35,0 @@ "devDependencies": {

@@ -1,4 +0,4 @@

# terraform
# terraform
> Terraform is the pre-processor engine for the Harp Web Server. Terraform does not write or serve files. It processes and provides a layout/partial paradgm.
> Terraform is the pre-processor engine for the [Harp](https://github.com/sintaxi/harp) web server. Terraform does not write or serve files. It processes and provides a layout/partial paradigm.

@@ -15,9 +15,11 @@ ## Features

**HTML** - EJS, Jade, Markdown
**CSS** - LESS, Stylus
**JavaScript** - CoffeeScript
**HTML** – EJS, Jade, Markdown
**CSS** – LESS, Stylus, Sass (SCSS)
**JavaScript** – CoffeeScript
## Install
npm install terraform
```
npm install terraform
```

@@ -39,3 +41,3 @@ ## API

```javascript
var planet = root("path/to/public/dir", { "title": "Bitchin" })
var planet = terraform.root("path/to/public/dir", { "title": "Bitchin" })
```

@@ -55,4 +57,15 @@

npm install
npm test
```
npm install
npm test
```
## License
Copyright © 2012–2014 Chloi Inc. All rights reserved.
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.
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