sass-args.js 411 B

12345678910111213141516171819
  1. #!/usr/bin/env node
  2. const path = require('path')
  3. const { existsSync } = require('fs')
  4. const { pkgStructs } = require('./lib/pkg-struct')
  5. let args = []
  6. for (let pkgStruct of pkgStructs) {
  7. let srcPath = path.join(pkgStruct.srcDir, 'main.scss')
  8. let destPath = path.join(pkgStruct.distDir, 'main.css')
  9. if (existsSync(srcPath)) {
  10. args.push(srcPath + ':' + destPath)
  11. }
  12. }
  13. console.log(args.join(' '))