Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

History

History
History
47 lines (40 loc) 路 1.36 KB

File metadata and controls

47 lines (40 loc) 路 1.36 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import fs from 'fs'
import path from 'path'
import {spawn} from 'child_process'
const relative = path => new URL(path, import.meta.url);
const args = process.argv.slice(2)
fs.readdir(relative('../src/themes'), (err, files) => {
if (err) {
console.error('err', err)
process.exit(1)
}
files.map(async (file) => {
if (/\.styl/g.test(file)) {
const stylusBin = ['node_modules', 'stylus', 'bin', 'stylus'].join(path.sep)
let cmdargs = [
stylusBin,
`src/themes/${file}`,
'-u',
'autoprefixer-stylus'
]
cmdargs = [...cmdargs, ...args]
const stylusCMD = spawn('node', cmdargs, { shell: true })
stylusCMD.stdout.on('data', (data) => {
console.log(`[Stylus Build ] stdout: ${data}`);
});
stylusCMD.stderr.on('data', (data) => {
console.error(`[Stylus Build ] stderr: ${data}`);
});
stylusCMD.on('close', (code) => {
const message = `[Stylus Build ] child process exited with code ${code}`
if (code !== 0) {
console.error(message);
process.exit(code)
}
console.log(message);
});
} else {
return
}
})
})
Morty Proxy This is a proxified and sanitized view of the page, visit original site.