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

plexiform

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plexiform - npm Package Compare versions

Comparing version 3.3.3 to 3.4.0

0

builds/_boilerplate.js

@@ -0,0 +0,0 @@ // jshint esversion: 6

@@ -0,0 +0,0 @@ // jshint esversion: 6

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ /* jshint esversion: 6 */

@@ -0,0 +0,0 @@ /* jshint esversion: 6 */

120

index.js

@@ -31,3 +31,3 @@ #!/usr/bin/env node

name: "Plexiform",
version: "3.3.3",
version: "3.4.0",
author: "Raith"

@@ -197,2 +197,5 @@ };

if (argv.command == "build") {
var configs = null;
if (!build_name || !spec_name) {

@@ -202,4 +205,10 @@ try {

pconfig = require(plexiformconfigname);
({ build_name, spec_name, output_folder } = pconfig);
console.log("Loaded");
if (pconfig !== null) {
if (Array.isArray(pconfig)) {
configs = pconfig;
} else {
({ build_name, spec_name, output_folder } = pconfig);
}
console.log("Loaded");
}
} catch (e) {

@@ -210,68 +219,75 @@ console.log(`ERROR! Cannot find ${plexiformconfigname}. See --init usage.`);

var builds = expandBuilds();
if (!configs) configs = [{ build_name, spec_name, output_folder }];
if (builds.length > 0 && spec_name) {
base_utils.output_folder = output_folder;
for (var i = 0; i < configs.length; i++) {
({ build_name, spec_name, output_folder } = configs[i]);
var builds = expandBuilds();
if (builds.length > 0 && spec_name) {
base_utils.output_folder = output_folder;
var rawspec, specobj;
try {
if (spec_name.match(/\.(json|js)$/)) {
spec = require(spec_name);
} else {
rawspec = fs.readFileSync(spec_name).toString();
var rawspec, specobj;
try {
if (spec_name.match(/\.(json|js)$/)) {
spec = require(spec_name);
} else {
rawspec = fs.readFileSync(spec_name).toString();
// Process .md file into MdDom object, otherwise leave as raw content
specobj = (spec_name.match(/\.md$/)) ? processmd(rawspec) : rawspec;
// Process .md file into MdDom object, otherwise leave as raw content
specobj = (spec_name.match(/\.md$/)) ? processmd(rawspec) : rawspec;
}
} catch (e) {
console.log(`ERROR! Cannot find spec file "${spec_name}" to require.`);
}
} catch (e) {
console.log(`ERROR! Cannot find spec file "${spec_name}" to require.`);
}
if (spec || specobj) {
// ensure we have an output folder
if (!fs.existsSync(output_folder)) fs.mkdirSync(output_folder);
if (spec || specobj) {
// ensure we have an output folder
if (!fs.existsSync(output_folder)) fs.mkdirSync(output_folder);
builds.forEach(build_name => {
builds.forEach(build_name => {
console.log("\nBUILDING...\n");
console.log(`${appSignature}\n\nbuild_name: ${build_name}\nspec_name: ${spec_name}\noutput_folder: ${output_folder}`);
console.log("\nBUILDING...\n");
console.log(`${appSignature}\n\nbuild_name: ${build_name}\nspec_name: ${spec_name}\noutput_folder: ${output_folder}`);
if (specobj) {
// Process the spec as necessary
try {
var processor = require(build_name).process;
spec = processor(specobj);
console.log(`Processed spec using ${build_name}.process`);
if (specobj) {
// Process the spec as necessary
try {
var processor = require(build_name).process;
spec = processor(specobj);
console.log(`Processed spec using ${build_name}.process`);
if ("save" in argv.options) {
var specSaveName = spec_name + '.json';
fs.writeFileSync(specSaveName, JSON.stringify(spec, null, 4));
if ("save" in argv.options) {
var specSaveName = spec_name + '.json';
fs.writeFileSync(specSaveName, JSON.stringify(spec, null, 4));
}
} catch (e2) {
console.log(`ERROR! Not able to process spec using ${build_name}.process"`);
}
} catch (e2) {
console.log(`ERROR! Not able to process spec using ${build_name}.process"`);
}
}
// add the app and base spec to our loaded/processed spec
augmentSpec(spec);
// add the app and base spec to our loaded/processed spec
augmentSpec(spec);
try {
build = require(build_name).build;
} catch (e) {
console.log(`ERROR! Cannot require build file ${build_name}.`);
}
try {
build = require(build_name).build;
} catch (e) {
console.log(`ERROR! Cannot require build file ${build_name}.`);
}
try {
build(spec, base_utils);
} catch (e) {
console.log(`ERROR! Cannot find execute ${build_name}.build.`);
}
try {
build(spec, base_utils);
} catch (e) {
console.log(`ERROR! Cannot find execute ${build_name}.build.`);
}
});
});
}
} else {
console.log(`ERROR! Not enough parameters, or unable to load ${plexiformconfigname}`);
}
} else {
console.log(`ERROR! Not enough parameters, or unable to load ${plexiformconfigname}`);
}
}

@@ -381,3 +397,3 @@

var secret = argv.options.secret || null;
var semver = argv.options.semver || "";
var semver = argv.options.semver || "?.?.?";
var details = argv.options.details || "";

@@ -384,0 +400,0 @@ var author = argv.options.author || "unknown";

{
"name": "plexiform",
"version": "3.3.3",
"version": "3.4.0",
"description": "A very simple template-driven generator.",

@@ -5,0 +5,0 @@ "main": "index.js",

# Plexiform
> **v3.3.3**
> **v3.4.0**

@@ -5,0 +5,0 @@ | In this document |

@@ -0,0 +0,0 @@ {

@@ -25,3 +25,3 @@ # Plexiform

| 2017-09-22 | v1.5.0 | Raith | added --save switch to save the processed config file |
| 2017-09-25 | v2.0.0 | Raith | To avoid ambiguity, config now only refers to how the *build* is configured and your *app* 'config' is now known as the 'spec' |
| 2017-09-25 | v2.0.0 | Raith | **Breaking change** To avoid ambiguity, config now only refers to how the *build* is configured and your *app* 'config' is now known as the 'spec' |
| 2017-09-25 | v2.0.1 | Raith | Refactored readme and renamed 'configs' folder |

@@ -32,3 +32,3 @@ | 2017-11-10 | v2.1.0 | Raith | Added new datatype 'datauri' which is implemented as a string, but flags its intended purpose for the sake of downstream tools |

| 2017-12-28 | v2.2.1 | Raith | Updated readme |
| 2017-12-29 | v3.0.0 | Raith | **Breaking change**. Removed single letter arguments, and incorporated process-md which impacts build scripts and installations |
| 2017-12-29 | v3.0.0 | Raith | **Breaking change** Removed single letter arguments, and incorporated process-md which impacts build scripts and installations |
| 2017-12-31 | v3.1.0 | Raith | Removal of processor parameter now that this has become more formalised. Will use exported process method of the build module instead |

@@ -41,3 +41,4 @@ | 2018-01-01 | v3.1.1 | Raith | Fix reference to defunct variable (should be using TypeScript) |

| 2018-01-11 | v3.3.3 | Raith | --build * now scans symbolic links (previously only found actual directories) |
| 2018-01-17 | v3.4.0 | Raith | Now supports an array of builds in plexiformconfig.json |
---

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