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

khaos

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

khaos - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

bin/khaos-create

12

History.md
0.5.3 / 2014-09-10
==================
* fix: ignore files correctly
* added list command
* make alias optional, fixes #44
* cleanup
* fix tests
* split out cli commands
0.5.2 - April 29, 2014

@@ -47,2 +57,2 @@ ----------------------

------------------------
:sparkles:
:sparkles:

@@ -30,2 +30,14 @@

return moment(date).format(format);
});
/**
* Add `is` and `isnt` helper.
*/
handlebars.registerHelper('is', function(value, match){
return value === match;
});
handlebars.registerHelper('isnt', function(value, match){
return value !== match;
});

10

lib/index.js

@@ -70,5 +70,6 @@

var metalsmith = new Metalsmith('/')
.use(this.ware)
.source(resolve(source))
.destination(resolve(destination));
.destination(resolve(destination))
// .frontmatter(false)
.use(this.ware);

@@ -88,9 +89,8 @@ if (stat(source).isDirectory()) return metalsmith.build(fn);

.build(function(err, files){
console.log(files);
rm(src);
rm(dest);
if (err) return fn(err);
cp(join(dest, source), destination);
rm(src);
rm(dest);
fn(null, files);
});
};
var basename = require('path').basename;
var date = require('metalsmith-build-date');
var deep = require('deep-extend');
var extend = require('extend');

@@ -110,5 +111,5 @@ var handlebars = require('handlebars');

var fn = prompt(schema, {
color: 'red',
color: 'white',
pad: 3,
schema: extend(schema, options.schema)
schema: deep(schema, options.schema)
});

@@ -130,3 +131,4 @@

var metadata = metalsmith.metadata();
for (var file in files) {
var filenames = extend({}, files);
for (var file in filenames) {
var data = files[file];

@@ -136,3 +138,5 @@ var fn = handlebars.compile(file);

var str = fn(clone);
var i = file.indexOf('{{');
delete files[file];
if (str == file.slice(0, i)) continue;
files[str] = data;

@@ -143,3 +147,3 @@ }

/**
* Templates.
* Template the file contents.
*/

@@ -153,15 +157,6 @@

/**
* Replace tabs in Makefiles so that they run properly.
*
* @param {Object} files
* @param {Metalsmith} metalsmith
* @param {Function} done
* Return the array of Metalsmith plugins.
*/
plugins.push(function makefiles(files, metalsmith, done){
// TODO
done();
});
return plugins;
}
}
{
"name": "khaos",
"repository": "git://github.com/segmentio/khaos.git",
"version": "0.5.2",
"version": "0.5.3",
"license": "MIT",

@@ -21,2 +21,3 @@ "description": "A super-simple way to generate directory or file templates.",

"cp": "^0.1.1",
"deep-extend": "^0.2.10",
"download-github-repo": "0.0.1",

@@ -28,3 +29,3 @@ "extend": "^1.2.1",

"metalsmith-build-date": "^0.1.0",
"metalsmith-prompt": "^0.0.6",
"metalsmith-prompt": "^0.0.7",
"metalsmith-templates": "^0.2.0",

@@ -39,3 +40,4 @@ "mkdirp": "^0.4.0",

"mocha": "~1.17.1",
"assert-dir-equal": "^1.0.0"
"assert-dir-equal": "^1.0.0",
"once": "^1.3.0"
},

@@ -42,0 +44,0 @@ "bin": {

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