New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@christian-slater/util

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@christian-slater/util - npm Package Compare versions

Comparing version 3.1.3 to 3.1.4

100

getConfig.js

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

const fs = require('fs-extra')
const path = require('path')
const merge = require('merge-deep')
const exit = require('exit')
const fs = require("fs-extra");
const path = require("path");
const merge = require("merge-deep");
const exit = require("exit");

@@ -9,13 +9,16 @@ /**

*/
const abs = require('./abs.js')
const fixPathSeparators = require("./fixPathSeparators.js")
const logger = require('./logger.js')
const log = logger('christian-slater')
const abs = require("./abs.js");
const fixPathSeparators = require("./fixPathSeparators.js");
const logger = require("./logger.js");
const log = logger("christian-slater");
module.exports = function getConfig (options) {
const configpath = abs(options.config || 'slater.config.js')
module.exports = function getConfig(options) {
const configpath = abs(options.config || "slater.config.js");
if (!fs.existsSync(configpath)) {
log.error(`looks like your config file (${options.config || 'slater.config.js'}) is missing`)
exit()
log.error(
`looks like your config file (${options.config ||
"slater.config.js"}) is missing`
);
exit();
}

@@ -26,28 +29,28 @@

*/
const config = merge({
in: '/src',
out:'/build',
assets: {
in: '/src/scripts/index.js'
}
}, require(configpath))
const config = merge(
{
in: "./src",
out: "./build",
assets: {
in: "./src/scripts/index.js"
}
},
require(configpath)
);
config.assets.alias = {
'@': abs(path.dirname(config.assets.in)),
"@": abs(path.dirname(config.assets.in)),
...(config.assets.alias || {})
}
};
if (!config.assets.presets) {
config.assets.presets = [
'maps',
'postcss'
]
config.assets.presets = ["maps", "postcss"];
}
if (config.assets.presets && !config.assets.presets.includes('maps')) {
config.assets.presets.push('maps')
if (config.assets.presets && !config.assets.presets.includes("maps")) {
config.assets.presets.push("maps");
}
if (!config.assets.out) {
config.assets.out = fixPathSeparators(path.join(config.out, 'assets'))
config.assets.out = fixPathSeparators(path.join(config.out, "assets"));
}

@@ -58,27 +61,30 @@

*/
config.theme = {}
config.theme = {};
try {
config.theme = config.themes[options.theme || 'development']
config.theme = config.themes[options.theme || "development"];
} catch (e) {
log.warn(`config`, `config for ${options.theme || 'development'} theme is missing`)
log.warn(
`config`,
`config for ${options.theme || "development"} theme is missing`
);
}
if (!config.theme) {
log.error(`your ${options.theme} theme appears to be missing`)
exit()
log.error(`your ${options.theme} theme appears to be missing`);
exit();
}
config.theme.name = options.theme || 'development'
config.theme.name = options.theme || "development";
config.theme.ignore = [].concat(config.theme.ignore || [], [
'**/scripts/**',
'**/scripts',
'**/styles/**',
'**/styles',
'DS_Store',
'*.yml',
'.DS_Store',
'node_modules'
])
"**/scripts/**",
"**/scripts",
"**/styles/**",
"**/styles",
"DS_Store",
"*.yml",
".DS_Store",
"node_modules"
]);

@@ -88,6 +94,6 @@ /**

*/
config.in = abs(config.in || '/src')
config.out = abs(config.out || '/build')
config.in = abs(config.in || "./src");
config.out = abs(config.out || "./build");
return config
}
return config;
};
{
"name": "@christian-slater/util",
"version": "3.1.3",
"version": "3.1.4",
"description": "shopify theme management toolkit",

@@ -21,3 +21,3 @@ "main": "index.js",

},
"gitHead": "ca6ae3b69d2209674952004ca72207210457d648"
"gitHead": "460731c1ec4ba75759861cc6a18350f959571d76"
}
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