FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular-meteor/scripts/dev.js at angular1 · Urigo/angular-meteor · GitHub
Urigo
/
angular-meteor
Public
Notifications
You must be signed in to change notification settings
Fork
603
Star
2.3k
Code
Issues
23
Pull requests
2
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
angular-meteor
/
scripts
/
dev.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (29 loc) · 867 Bytes
Breadcrumbs
angular-meteor
/
scripts
/
dev.js
Copy path
File metadata and controls
35 lines (29 loc) · 867 Bytes
Raw
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
#!/usr/bin/env node
var
replace
=
require
(
'replace-in-file'
)
;
var
fs
=
require
(
'fs'
)
;
function
wrapInQuotes
(
file
)
{
return
'\''
+
file
+
'\''
;
}
// look up for --stop flag
var
isStop
=
process
.
argv
.
slice
(
2
)
.
indexOf
(
'--stop'
)
!==
-
1
;
// path to angular-meteor-data package
var
path
=
'packages/angular-meteor-data/'
;
// package definition
var
packageFile
=
path
+
'package.js'
;
// angular-meteor file
var
npmFile
=
'.npm/package/node_modules/angular-meteor/dist/angular-meteor.js'
;
var
devFile
=
'angular-meteor.js'
;
// replace options
var
options
=
{
files
:
packageFile
,
replace
:
wrapInQuotes
(
isStop
?
devFile
:
npmFile
)
,
with
:
wrapInQuotes
(
isStop
?
npmFile
:
devFile
)
}
;
// clean up first
try
{
if
(
fs
.
accessSync
(
path
+
devFile
,
fs
.
F_OK
)
)
{
fs
.
unlinkSync
(
path
+
devFile
)
;
}
}
catch
(
e
)
{
}
// make sure package uses proper file
replace
(
options
)
;
Back
|
FazBrowse Home
|
New Git URL