work.suroh.tk/node_modules/sass-lookup/bin/cli.js

20 lines
499 B
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
#!/usr/bin/env node
'use strict';
const lookup = require('../');
const program = require('commander');
program
.version(require('../package.json').version)
.usage('[options] <path>')
.option('-f, --filename [path]', 'file containing the dependency')
.option('-d, --directory [path]', 'location of all sass files')
.parse(process.argv);
const filename = program.filename;
const directory = program.directory;
const dep = program.args[0];
console.log(lookup(dep, filename, directory));