Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
eResearch
CalcyteJS
Commits
35a8f617
Commit
35a8f617
authored
Nov 15, 2019
by
PTSEFTON
Browse files
Update context
parent
d5761a89
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/defaults.js
View file @
35a8f617
...
...
@@ -38,7 +38,7 @@ const ROCrate_profile_file = "defaults/profile-datacrate-v" + ROCrate_version +
const
path
=
require
(
"
path
"
)
const
DEFAULTS
=
path
.
join
(
__dirname
,
'
../defaults
'
);
const
defaults_dir
=
DEFAULTS
;
const
context
=
"
https://r
aw.githubusercontent.com/R
esearch
O
bject
/ro-crate/master/docs/0.3-DRAFT
/context.json
"
;
const
context
=
"
https://research
o
bject
.github.io/ro-crate/1.0
/context.json
ld
"
;
const
default_context
=
context
;
const
metadata_template
=
path
.
join
(
DEFAULTS
,
'
metadata_template.html
'
);
const
render_script
=
"
https://code.research.uts.edu.au/eresearch/CalcyteJS/raw/feature/or-crate/lib/render.js
"
;
...
...
lib/item.js
View file @
35a8f617
...
...
@@ -135,6 +135,9 @@ module.exports = function() {
if
(
Array
.
isArray
(
value
))
{
value
=
value
[
0
];
}
if
(
!
value
)
{
value
=
uuidv4
();
}
if
(
value
.
endsWith
(
"
/
"
)
||
value
.
startsWith
(
"
.
"
)
||
value
.
match
(
/^
(
https
?
:
\/\/
|mailto:.*@|_b:
)
/i
))
{
this
.
id
=
value
;
}
...
...
package.json
View file @
35a8f617
...
...
@@ -31,7 +31,7 @@
"
json
"
:
"
^9.0.6
"
,
"
jsonld
"
:
"
^1.6.2
"
,
"
node-json2html
"
:
"
^1.1.1
"
,
"
ro-crate
"
:
"
^1.2.1
2
"
,
"
ro-crate
"
:
"
^1.2.1
4
"
,
"
sha1
"
:
"
^1.1.1
"
,
"
shelljs
"
:
"
^0.8.1
"
,
"
tmp
"
:
"
0.0.33
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment