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

ampersand

Package Overview
Dependencies
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

19

lib/app/generateApp.js

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

var fs = require('fs');
var ncp = require('ncp').ncp;
var rimraf = require('rimraf');
var fs = require('fs-extra');
var slugger = require('slugger');

@@ -38,3 +36,4 @@

ncp(__dirname + '/../../template/shared', config.projectFolder, {
var templateDir = __dirname + '/../../template/';
fs.copy(templateDir + 'shared', config.projectFolder, {
transform: function (readable, writeable, file) {

@@ -50,8 +49,8 @@ if (isImageFile(file.name)) {

if (err) return cb(err);
copyFilesInDir(__dirname + '/../../template/' + config.framework, config, config.projectFolder);
// since we don't have spacemonkey working right for hapi, yet
copyFilesInDir(templateDir + config.framework, config);
// since we don't have spacemonkey working right for hapi
if (config.framework === 'hapi') {
rimraf.sync(config.projectFolder + '/test');
fs.removeSync(config.projectFolder + '/test');
}
fs.writeFileSync(config.projectFolder + '/package.json', JSON.stringify(getPackageFile(config), null, 2), {encoding: 'utf8'});
fs.outputJsonSync(config.projectFolder + '/package.json', getPackageFile(config), {spaces: 2});
cb();

@@ -67,8 +66,8 @@ });

fs.readdirSync(dir).forEach(function (filename) {
var string = fs.readFileSync(dir + '/' + filename, {encoding: 'utf8'});
var string = fs.readFileSync(dir + '/' + filename, 'utf8');
// replace our template tags with values
string = processString(string, options);
// write it out
fs.writeFileSync(options.projectFolder + '/' + filename, string, {encoding: 'utf8'});
fs.outputFileSync(options.projectFolder + '/' + filename, string);
});
}

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

var fs = require('fs');
var path = require('path');
var chalk = require('chalk');
var fsExtra = require('fs-extra');
var fs = require('fs-extra');
var quit = require('./quit');

@@ -67,8 +66,6 @@ var stdin = require('./helpers/stdin');

var collectionFilePath = path.join(collectionPath, result.collectionFileName);
fsExtra.createFileSync(modelFilePath);
fs.writeFileSync(modelFilePath, clean(result.model, config), 'utf8');
fs.outputFileSync(modelFilePath, clean(result.model, config), 'utf8');
console.log('\nnew ' + chalk.magenta('Model') + ' created as ' + chalk.magenta(path.relative(process.cwd(), modelFilePath)));
if (config.makecollection) {
fsExtra.createFileSync(collectionFilePath);
fs.writeFileSync(collectionFilePath, clean(result.collection, config), 'utf8');
fs.outputFileSync(collectionFilePath, clean(result.collection, config), 'utf8');
console.log('new ' + chalk.magenta('Collection') + ' for ' + chalk.magenta(name) + ' created as ' + chalk.magenta(path.relative(process.cwd(), collectionFilePath)));

@@ -81,4 +78,3 @@ }

genTypes.form({modelpath: name}, function (err, code) {
fsExtra.createFileSync(filePath);
fs.writeFileSync(filePath, clean(code, config), 'utf8');
fs.outputFileSync(filePath, clean(code, config), 'utf8');
quit('new ' + chalk.magenta('Form') + ' for ' + chalk.magenta(path.basename(fileName)) + ' created as ' + chalk.magenta(path.relative(process.cwd(), filePath)));

@@ -89,5 +85,4 @@ });

if (!file) return quit('no template file found at ' + config[type]);
fsExtra.createFileSync(filePath);
file = clean(processTemplate(file, config), config);
fs.writeFileSync(filePath, file, 'utf8');
fs.outputFileSync(filePath, file, 'utf8');
quit('new ' + chalk.magenta(type) + ' created as ' + chalk.magenta(config.relPath), 0);

@@ -94,0 +89,0 @@ }

{
"name": "ampersand",
"description": "CLI tool for generating single page apps a. la. http://humanjavascript.com",
"version": "3.0.5",
"version": "3.0.6",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -16,3 +16,3 @@ "bin": {

"find-root": "^0.1.1",
"fs-extra": "^0.14.0",
"fs-extra": "^0.24.0",
"inquirer": "^0.8.0",

@@ -22,7 +22,5 @@ "jade": "^1.8.2",

"multiline": "^1.0.1",
"ncp": "^1.0.1",
"rc": "^1.0.0",
"readable-stream": "~1.1.0",
"repeat-string": "^1.2.0",
"rimraf": "^2.2.6",
"slugger": "^1.0.0"

@@ -29,0 +27,0 @@ },

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

var rimraf = require('rimraf');
var fs = require('fs-extra');
var generateApp = require('./lib/app/generateApp');

@@ -12,4 +12,4 @@

rimraf('hapi_build', function () {
rimraf('express_build', function () {
fs.remove('hapi_build', function () {
fs.remove('express_build', function () {
generateApp(input, function (err) {

@@ -16,0 +16,0 @@ if (err) throw err;

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