Skip to content

Commit f0d547d

Browse files
committed
change cmod v3
1 parent 21f1e04 commit f0d547d

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed

cli.js

-59
Original file line numberDiff line numberDiff line change
@@ -36,62 +36,3 @@ posthtml(plugins)
3636
.then(function (result) {
3737
fs.writeFileSync(argv.output, result.html);
3838
});
39-
-f less foo_bar');
40-
console.log(' bemstyla -d styles/blocks blockname');
41-
console.log('');
42-
})
43-
.parse(process.argv);
44-
45-
updateNotifier({pkg: pkg}).notify();
46-
47-
if (program.args.length < 1) {
48-
program.help();
49-
}
50-
51-
function checkExists(path) {
52-
return new Promise(function (resolve, reject) {
53-
fs.stat(path, function (err, stats) {
54-
if (!err || (stats && stats.isDirectory())) {
55-
return resolve(path);
56-
}
57-
console.log(err.message);
58-
return reject();
59-
});
60-
});
61-
}
62-
63-
function checkAccess(path) {
64-
return new Promise(function (resolve, reject) {
65-
fs.access(path, fs.R_OK | fs.W_OK, function (err) {
66-
if (!err) {
67-
return resolve();
68-
}
69-
console.error(err.message);
70-
return reject();
71-
});
72-
});
73-
}
74-
75-
function start() {
76-
var index = require('../lib/index');
77-
78-
_.forEach(program.args, function (arg) {
79-
index({
80-
source: arg,
81-
fileType: program.type,
82-
fileFormat: program.format || program.type,
83-
baseDir: program.dir
84-
});
85-
});
86-
}
87-
88-
if (program.dir) {
89-
checkExists(program.dir)
90-
.then(checkAccess)
91-
.then(function () {
92-
start();
93-
})
94-
.catch(function () {});
95-
} else {
96-
start();
97-
}

0 commit comments

Comments
 (0)