Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmsc388winter2019-student
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andrej Rasevic
cmsc388winter2019-student
Commits
c1304a76
Commit
c1304a76
authored
6 years ago
by
Andrej Rasevic
Browse files
Options
Downloads
Patches
Plain Diff
adding to code_along example
parent
4ba92bcf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmsc388b/code_along/weather/cmds/help.js
+4
-4
4 additions, 4 deletions
cmsc388b/code_along/weather/cmds/help.js
cmsc388b/code_along/weather/index.js
+12
-2
12 additions, 2 deletions
cmsc388b/code_along/weather/index.js
with
16 additions
and
6 deletions
cmsc388b/code_along/weather/cmds/help.js
+
4
−
4
View file @
c1304a76
...
@@ -13,9 +13,9 @@ const menus = {
...
@@ -13,9 +13,9 @@ const menus = {
}
}
module
.
exports
=
(
args
)
=>
{
module
.
exports
=
(
args
)
=>
{
cons
t
subCmd
=
args
.
_
[
0
]
===
'
help
'
cons
ole
.
log
(
"
***********
"
)
?
args
.
_
[
1
]
console
.
log
(
args
.
_
[
0
])
:
args
.
_
[
0
]
const
subCmd
=
args
.
_
[
0
]
===
'
help
'
?
args
.
_
[
1
]
:
args
.
_
[
0
]
console
.
log
(
subCmd
)
console
.
log
(
menus
[
subCmd
]
||
menus
.
main
)
console
.
log
(
menus
[
subCmd
]
||
menus
.
main
)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cmsc388b/code_along/weather/index.js
+
12
−
2
View file @
c1304a76
...
@@ -2,8 +2,18 @@ const minimist = require('minimist')
...
@@ -2,8 +2,18 @@ const minimist = require('minimist')
module
.
exports
=
()
=>
{
module
.
exports
=
()
=>
{
const
args
=
minimist
(
process
.
argv
.
slice
(
2
))
const
args
=
minimist
(
process
.
argv
.
slice
(
2
))
//console.log(args);
console
.
log
(
"
args is:
"
);
const
cmd
=
args
.
_
[
0
]
console
.
log
(
args
);
let
cmd
=
args
.
_
[
0
]
||
'
help
'
if
(
args
.
version
||
args
.
v
)
{
cmd
=
'
version
'
}
if
(
args
.
help
||
args
.
h
)
{
cmd
=
'
help
'
}
console
.
log
(
"
------------
"
)
console
.
log
(
cmd
);
console
.
log
(
cmd
);
switch
(
cmd
)
{
switch
(
cmd
)
{
case
'
today
'
:
case
'
today
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment