FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
webpack/lib/ModuleParserHelpers.js at master · codeinvain/webpack · GitHub
codeinvain
webpack
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
webpack
/
lib
/
ModuleParserHelpers.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (20 loc) · 526 Bytes
Breadcrumbs
webpack
/
lib
/
ModuleParserHelpers.js
Copy path
File metadata and controls
21 lines (20 loc) · 526 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
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var
ModuleParserHelpers
=
exports
;
ModuleParserHelpers
.
addParsedVariable
=
function
(
parser
,
name
,
expression
)
{
if
(
!
parser
.
state
.
current
.
addVariable
)
return
false
;
var
deps
=
[
]
;
parser
.
parse
(
expression
,
{
current
:
{
addDependency
:
function
(
dep
)
{
dep
.
userRequest
=
name
;
deps
.
push
(
dep
)
;
}
}
,
module
:
parser
.
state
.
module
}
)
;
parser
.
state
.
current
.
addVariable
(
name
,
expression
,
deps
)
;
return
true
;
}
;
Back
|
FazBrowse Home
|
New Git URL