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

fascio

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

fascio - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

fascio.config.example.js

24

cli.js
#!/usr/bin/env node
const chokidar = require('chokidar');
const chalk = require('chalk');

@@ -9,31 +8,14 @@ const yargs = require('yargs/yargs');

const { getDirFromPath } = require('./lib/helpers');
const Watcher = require('./lib/Watcher');
try {
const isWatching = argv?.watch || false;
const isServing = argv?.serve || false;
const watchEvents = ['add', 'change', 'unlink', 'addDir', 'unlinkDir'];
const pathToConfig = [process.cwd(), argv?.dir, 'fascio.config.js'].join('/').replace('//', '/');
const userConfig = require(pathToConfig);
userConfig(isWatching);
userConfig({ isWatching, changedFile: null, isFirstPass: true });
if (isWatching) {
let dir = `${getDirFromPath(pathToConfig)}/src/**/*`; // TODO: Make this configurable
const watcher = chokidar.watch(dir, {
persistent: true,
});
watcher.on('error', (error) => {
console.log(chalk.red(`🔴 Error: ${error}`));
});
watcher.on('ready', () => {
console.log(chalk.blue('👀 Watching for changes...'));
watchEvents.forEach((event) => {
watcher.on(event, () => {
userConfig(isWatching);
});
});
});
const watcher = new Watcher({ dir, callback: userConfig, context: { isWatching } });
}

@@ -40,0 +22,0 @@ } catch (error) {

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

const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const argv = yargs(hideBin(process.argv)).argv;
const compilers = {

@@ -2,0 +6,0 @@ scss: require('./lib/compilers/scss'),

@@ -11,2 +11,7 @@ const getFilenameFromPath = (path) => {

module.exports = { getFilenameFromPath, getDirFromPath };
const getExtensionFromFilename = (filename) => {
let extension = filename.lastIndexOf('.');
return filename.substring(extension + 1);
};
module.exports = { getFilenameFromPath, getDirFromPath, getExtensionFromFilename };
{
"name": "fascio",
"version": "0.1.2",
"version": "0.2.0",
"description": "A simple asset bundler for frontend assets",

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

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