Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env node
/* eslint-disable no-console */
import program from 'commander';
import pkginfo from 'pkginfo';
import fs from 'fs';
import resin from '../lib/index.js';
pkginfo(module, 'version', 'description');
function list(val) {
const result = val.replace(/(^(?:"|')?\[)|(](?:"|')?$)/g, '').split(',');
return result.map((item) => item.trim().replace(/(^(?:"|')?)|((?:"|')?$)/g, ''));
}
program
.description(module.exports.description)
.usage('[options] ')
.option('-v, --no-vars', 'Passing this flag will skip using the postcss-css-variables plugin.')
.option('-e, --no-extend', 'Passing this flag will skip using the postcss-inherit plugin.')
.option('-n, --namespace ', 'Namespace to use as a prefix for classes.', '')
.option('-u, --urlprefix ', 'String to prepend to urls.', '')
.option('-b, --browsers ', 'Browser string to pass to autoprefixer.', 'last 2 version')
.option('-a, --no-autoprefixer', 'Passing this flag will disable autoprefixer.')
.option('-d, --debug',
import Xejs from 'xejs';
import pkginfo from 'pkginfo';
pkginfo(module, "version");
const version = module.exports.version;
function getDate(): string {
const date = new Date();
const day = date.getDate();
const month = date.getMonth() + 1;
const year = date.getFullYear();
return day + "/" + month + "/" + year;
}
export default class XejsLoader {
public loadFile(file: string): Promise {
const options = this.generateOptions();
const loader = new Xejs(options);
return loader.render(file);
}