Socket
Socket
Sign inDemoInstall

sndicate-js

Package Overview
Dependencies
95
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.1.5

8

CHANGELOG.md

@@ -0,1 +1,9 @@

<a name="0.1.4"></a>
### 0.1.4 (2014-10-21)
<a name="0.1.3"></a>
### 0.1.3 (2014-10-21)
<a name="0.1.2"></a>

@@ -2,0 +10,0 @@ ### 0.1.2 (2014-10-21)

4

dist/snd.js
#!/usr/bin/env node
/*! sndicate-js v0.1.2 (c) 2014 Bill Patrianakos
* Codename: Tomas Lamas (0.1.2-201410211645)
/*! sndicate-js v0.1.4 (c) 2014 Bill Patrianakos
* Codename: Tomas Lamas (0.1.4-201410211646)
* https://github.com/Sndicate/sndicate-js
*/
"use strict";function normalizePaths(){}function throwError(a,b,c,d){var e;switch(b){case">":e=a>c;break;case"<":e=c>a;break;case"==":e=a==c;break;case"===":e=a===c;break;case"!==":e=a!==c;break;case"includes":e=_.contains(a,c);break;case"!includes":e=!_.contains(a,c);break;default:e=!0}e&&(say.error(d),process.exit(1))}var _=require("lodash"),fs=require("fs-extra"),path=require("path"),chalk=require("chalk"),glob=require("glob"),prompt=require("prompt"),HJSON=require("hjson"),YAML=require("yamljs"),options={commands:{"package":{shortcut:"p",desc:"Package a UI module",usage:"sndjs package [MODE] <path/to/sndicate>",longDesc:'Packages themes or modules. Mode is either "theme" or "module".\nWhen no mode is selected sndjs uses theme mode.',flags:{mode:{type:String,val:"theme",required:!1,shortcut:"-m",desc:"Mode used for installation (Options are 'theme' or 'module')"},dist:{type:String,val:"dist",required:!1,shortcut:"-d",desc:'Name of folder containing your built theme package. Assumes "dist/" if not defined.',usage:"dist <folder_name>"},install:{type:Boolean,val:!1,required:!1,shortcut:"i",desc:"Run Sndicate theme install command within Sndicate directory (requires snd-commands gem installed)",usage:"sndjs package install <path/to/sndicate>"}}},generate:{shortcut:"g",desc:"Generate a new UI module project",usage:"sndjs generate [TYPE] <name>",longDesc:"Generate a new UI module. Will generate a theme by default. Options are:\n* theme\n* dashboard",flags:{}},version:{shortcut:"-v",desc:"Show version info.",usage:"sndjs version",longDesc:"Show sndicate-js version",flags:{}},smoke:{shortcut:"s",desc:"Smoke test",usage:"sndjs smoke flags and options in any order here",longDesc:"A smoke test for seeing if the option parser is working",flags:{test:{type:String,val:"smokeyyyy",required:!0,shortcut:"-smk",desc:"A test flag."}}}},banner:"Sndicate-js (sndjs) v0.1.0-a",help:""},actions={"package":function(a,b,c){throwError(c.length,"<",1,"Error: Path to Sndicate root dir missing");var d=a.commands.package.flags,e=b.mode||d.mode.val,f=c[0],g=b.dist||d.dist.val;"theme"===e?fs.readFile("package.json","utf-8",function(a,b){throwError(a,"===",!0,"Error reading package.json file: \n"+a),say.log("Reading package.json...");var c=HJSON.parse(b,{keepWsc:!1}),d={folder:c.name,name:c._sndManifest.name,description:c.description,repo:c.repository.url,assets:{css:"css",js:"js",fonts:"fonts",images:"img",files:[],dirs:[]}},e=YAML.stringify(d,4),h=g+"/manifest.yml";fs.outputFile(h,e,function(a){throwError(a,"===",!0,"Error writing manifest.yml file: \n"+a),say.log("Writing manifest.yml file..."),fs.copy(g,f+"/themes/"+d.folder,function(a){throwError(a,"===",!0,"Error copying to theme folder: \n"+a),say.log("Copying to Sndicate theme folder..."),say.success(d.name+"theme installed at "+f+"/themes/"+d.folder)})})}):"dash"===e||"dashboard"===e||throwError(["theme","dash","dashboard"],"!includes",e,"Error: Unrecognized mode")},generate:function(a,b,c){throwError(c.length,"<",1,"Error: A name is required");c.length>1?c[1]:c[0],c.length>1?c[0]:"theme"},version:function(){fs.readFile(path.join(__dirname,"lib","config.json"),"utf-8",function(a,b){throwError(a,"==",!0,"Error reading configuration file. Your sndicate-js installation may be corrupt: "+a),a&&say.error(a);var c=JSON.parse(b);say.plain(c.version),process.exit(0)})},smoke:function(a,b,c){var d=a.commands.smoke.flags;say.log("Here are your params");var e=1;c.forEach(function(a){say.plain(e+": "+a),e++}),say.log("Here are the parsed options");for(var f in b)say.plain(f+": "+b[f]);say.log("Here are your defaults"),say.warn("Full defaults: "+d);for(var g in d)say.warn("Default is: "+g),say.plain("Its value is "+d[g].val)}},say={plain:function(a){console.log(a)},log:function(a){console.log(chalk.gray.dim(a))},warn:function(a){console.warn(chalk.bold.yellow(a))},error:function(a){console.warn(chalk.bold.red(a))},fatal:function(a){console.warn(chalk.bgRed.white.bold(a))},success:function(a){console.log(chalk.green(a))}},run=require("conventional")(options,actions);
{
"name": "sndicate-js",
"version": "0.1.3",
"version": "0.1.5",
"description": "Command line utility for developing, installing, and generally working with Sndicate front-end modules.",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc