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.4 to 3.0.5

7

lib/generate-template.js

@@ -18,2 +18,4 @@ var fs = require('fs');

var folderPath;
var collectionPath;
var collectionToModelPath;
var file;

@@ -35,3 +37,5 @@ var fileName;

folderPath = path.join(config.approot, config.clientfolder, config.modelfolder);
collectionPath = path.join(config.approot, config.clientfolder, config.collectionfolder);
filePath = path.join(folderPath, fileName);
collectionToModelPath = path.join(path.relative(collectionPath, folderPath), name).replace(/\\/g, '/');
} else if (type === 'view') {

@@ -61,5 +65,6 @@ if (!name) quit('please specify a name: ampersand gen view ' + chalk.magenta('${your view name}'));

config.name = name;
config.collectionToModelPath = collectionToModelPath;
genTypes.model(config, function (err, result) {
var modelFilePath = path.join(config.folderPath, result.modelFileName);
var collectionFilePath = path.join(config.folderPath, result.collectionFileName);
var collectionFilePath = path.join(collectionPath, result.collectionFileName);
fsExtra.createFileSync(modelFilePath);

@@ -66,0 +71,0 @@ fs.writeFileSync(modelFilePath, clean(result.model, config), 'utf8');

2

lib/templates/collection.js
// {{{ name }}} Collection - {{{ collectionFileName }}}.js
var AmpCollection = require('ampersand-rest-collection');
var {{{ name }}} = require('./{{{ fileName }}}');
var {{{ name }}} = require('{{{ collectionToModelPath }}}');

@@ -5,0 +5,0 @@

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

@@ -6,0 +6,0 @@ "bin": {

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