Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mirador-video-annotations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Loïs Poujade
mirador-video-annotations
Commits
53a297b1
Commit
53a297b1
authored
Jul 7, 2020
by
Chris Beer
Browse files
Options
Downloads
Patches
Plain Diff
Use the init artifact as the dev entry point and restore state exports to the full UMD build
parent
49f4af63
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/index.js
+3
-1
3 additions, 1 deletion
src/index.js
src/init.js
+7
-1
7 additions, 1 deletion
src/init.js
webpack.config.js
+2
-15
2 additions, 15 deletions
webpack.config.js
with
12 additions
and
17 deletions
src/index.js
+
3
−
1
View file @
53a297b1
import
init
from
'
./init
'
;
import
init
from
'
./init
'
;
import
*
as
state
from
'
./state
'
;
const
exports
=
{
const
exports
=
{
viewer
:
init
,
...
init
,
...
state
,
};
};
export
default
exports
;
export
default
exports
;
This diff is collapsed.
Click to expand it.
src/init.js
+
7
−
1
View file @
53a297b1
...
@@ -3,7 +3,7 @@ import MiradorViewer from './lib/MiradorViewer';
...
@@ -3,7 +3,7 @@ import MiradorViewer from './lib/MiradorViewer';
/**
/**
* Default Mirador instantiation
* Default Mirador instantiation
*/
*/
export
default
function
(
config
,
pluginsOrStruct
)
{
function
viewer
(
config
,
pluginsOrStruct
)
{
let
struct
;
let
struct
;
if
(
Array
.
isArray
(
pluginsOrStruct
))
{
if
(
Array
.
isArray
(
pluginsOrStruct
))
{
...
@@ -14,3 +14,9 @@ export default function (config, pluginsOrStruct) {
...
@@ -14,3 +14,9 @@ export default function (config, pluginsOrStruct) {
return
new
MiradorViewer
(
config
,
struct
);
return
new
MiradorViewer
(
config
,
struct
);
}
}
const
exports
=
{
viewer
,
};
export
default
exports
;
This diff is collapsed.
Click to expand it.
webpack.config.js
+
2
−
15
View file @
53a297b1
...
@@ -61,7 +61,7 @@ module.exports = (env, options) => {
...
@@ -61,7 +61,7 @@ module.exports = (env, options) => {
const
config
=
baseConfig
(
options
.
mode
);
const
config
=
baseConfig
(
options
.
mode
);
if
(
isProduction
)
{
if
(
isProduction
)
{
const
prodConfig
=
{
return
{
...
config
,
...
config
,
devtool
:
'
source-map
'
,
devtool
:
'
source-map
'
,
mode
:
'
production
'
,
mode
:
'
production
'
,
...
@@ -72,19 +72,6 @@ module.exports = (env, options) => {
...
@@ -72,19 +72,6 @@ module.exports = (env, options) => {
}),
}),
],
],
};
};
return
[
prodConfig
,
{
...
prodConfig
,
entry
:
[
'
./src/polyfills.js
'
,
'
./src/state/index.js
'
],
output
:
{
...
prodConfig
.
output
,
filename
:
'
mirador-state.min.js
'
,
library
:
'
MiradorState
'
,
},
},
];
}
}
return
{
return
{
...
@@ -95,7 +82,7 @@ module.exports = (env, options) => {
...
@@ -95,7 +82,7 @@ module.exports = (env, options) => {
port
:
4444
,
port
:
4444
,
},
},
devtool
:
'
eval-source-map
'
,
devtool
:
'
eval-source-map
'
,
entry
:
[
'
react-hot-loader/patch
'
,
...
config
.
entry
],
entry
:
[
'
react-hot-loader/patch
'
,
'
./src/polyfills.js
'
,
'
./src/init.js
'
],
mode
:
'
development
'
,
mode
:
'
development
'
,
};
};
};
};
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