FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
webpack/lib/Module.js at d80cdcefac9aa6ee697985a6dbb86d2f3242c561 · codeinvain/webpack · GitHub
codeinvain
webpack
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
webpack
/
lib
/
Module.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
67 lines (56 loc) · 1.66 KB
Breadcrumbs
webpack
/
lib
/
Module.js
Copy path
File metadata and controls
67 lines (56 loc) · 1.66 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var
DependenciesBlock
=
require
(
"./DependenciesBlock"
)
;
var
ModuleReason
=
require
(
"./ModuleReason"
)
;
var
debugId
=
1000
;
function
Module
(
)
{
DependenciesBlock
.
call
(
this
)
;
this
.
context
=
null
;
this
.
reasons
=
[
]
;
this
.
debugId
=
debugId
++
;
this
.
lastId
=
-
1
;
this
.
id
=
null
;
this
.
chunks
=
[
]
;
this
.
warnings
=
[
]
;
this
.
dependenciesWarnings
=
[
]
;
this
.
errors
=
[
]
;
this
.
dependenciesErrors
=
[
]
;
}
module
.
exports
=
Module
;
Module
.
prototype
=
Object
.
create
(
DependenciesBlock
.
prototype
)
;
Module
.
prototype
.
disconnect
=
function
(
)
{
this
.
reasons
.
length
=
0
;
this
.
lastId
=
this
.
id
;
this
.
id
=
null
;
this
.
chunks
.
length
=
0
;
DependenciesBlock
.
prototype
.
disconnect
.
call
(
this
)
;
}
;
Module
.
prototype
.
addChunk
=
function
(
chunk
)
{
var
idx
=
this
.
chunks
.
indexOf
(
chunk
)
;
if
(
idx
<
0
)
this
.
chunks
.
push
(
chunk
)
;
}
;
Module
.
prototype
.
_removeAndDo
=
require
(
"./removeAndDo"
)
;
Module
.
prototype
.
removeChunk
=
function
(
chunk
)
{
this
.
_removeAndDo
(
"chunks"
,
chunk
,
"removeModule"
)
;
}
;
Module
.
prototype
.
addReason
=
function
(
module
,
dependency
)
{
this
.
reasons
.
push
(
new
ModuleReason
(
module
,
dependency
)
)
;
}
;
Module
.
prototype
.
toString
=
function
(
)
{
return
"Module["
+
(
this
.
id
||
this
.
debugId
)
+
"]"
;
}
;
Module
.
prototype
.
needRebuild
=
function
(
fileTimestamps
,
contextTimestamps
)
{
return
true
;
}
;
Module
.
prototype
.
updateHash
=
function
(
hash
)
{
hash
.
update
(
this
.
id
+
""
)
;
DependenciesBlock
.
prototype
.
updateHash
.
call
(
this
,
hash
)
;
}
;
Module
.
prototype
.
identifier
=
null
;
Module
.
prototype
.
readableIdentifier
=
null
;
Module
.
prototype
.
build
=
null
;
Module
.
prototype
.
source
=
null
;
Module
.
prototype
.
size
=
null
;
Back
|
FazBrowse Home
|
New Git URL