1
1
mirror of https://github.com/primer/css.git synced 2024-12-04 03:46:28 +03:00
css/tools/primer-module-build/cli.js

30 lines
651 B
JavaScript
Raw Normal View History

#!/usr/bin/env node
'use strict'
2018-05-01 00:23:23 +03:00
/* eslint-disable no-console */
const meow = require('meow')
const build = require('./')
const cli = meow(`
Usage
$ primer-module-build [file]
File
File. This is required. The file input is the .scss file that
will be built into .css. The build automatically looks in the
node_modules/ directory for any inputs.
Example
$ primer-module-build index.scss
`)
build(cli)
.then(files => {
console.warn('YES! wrote %d files:', files.length)
for (const file of files) console.warn(file)
process.exit(0)
})
.catch(err => {
console.error('NO:', err)
process.exit(1)
})