-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbin.js
More file actions
executable file
·37 lines (29 loc) · 866 Bytes
/
bin.js
File metadata and controls
executable file
·37 lines (29 loc) · 866 Bytes
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
#!/usr/bin/env node
import run from './src/run.js'
const userWantsHelp =
process.argv.indexOf('-h') > -1 ||
process.argv.indexOf('--h') > -1 ||
process.argv.indexOf('-help') > -1 ||
process.argv.indexOf('--help') > -1 ||
process.argv.indexOf('help') > -1
if (userWantsHelp) {
console.log(`
mspg - magic static page generator
usage:
mspg [TASKS]...
available tasks:
clean - deletes the public directory
build - builds the src dir to public
serve - serves the public dir
connect - connects the git repository to it's gh-pages branch
publish - publishes the current HEAD to github/gitlab pages
help - this help text
examples:
production build
NODE_ENV=production mspg clean build zip
development (build files and serve them on 3000)
mspg build serve
`)
process.exit()
}
run()