generated from adapt-security/adapt-authoring-templatemodule
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ec1717d
Showing
10 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# adapt-authoring-templatemodule | ||
This is a template Adapt authoring module. Feel free to use this as a base for creating your own authoring tool modules! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"type": "object", | ||
"properties": { | ||
"isTemplate": { | ||
"description": "Whether this module is a template", | ||
"type": "boolean", | ||
"default": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Template | ||
This is a template documentation page that will be included in the developer guides when built using the `adapt-authoring-docs module`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './lib/TemplateModule.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"error.templateerror": "Template error message!" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { AbstractModule } from 'adapt-authoring-core'; | ||
|
||
export default class TemplateModule extends AbstractModule { | ||
/** @override */ | ||
async init() { | ||
// do custom initialisation here | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "adapt-authoring-templatemodule", | ||
"version": "0.0.1", | ||
"description": "A template module for the Adapt authoring tool", | ||
"homepage": "https://github.com/adapt-security/adapt-authoring-templatemodule", | ||
"license": "GPL-3.0", | ||
"type": "module", | ||
"main": "index.js", | ||
"repository": "github:adapt-security/adapt-authoring-templatemodule", | ||
"peerDependencies": { | ||
"adapt-authoring-core": "github:adapt-security/adapt-authoring-core" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$anchor": "template", | ||
"description": "Just a template", | ||
"type": "object", | ||
"properties": { | ||
"mandatoryField": { | ||
"description": "This field is included in required, so is mandatory", | ||
"type": "string" | ||
}, | ||
"optionalField": { | ||
"description": "This field is not included in required, so is optional", | ||
"type": "number", | ||
"default": 1 | ||
} | ||
}, | ||
"required": ["requiredField"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const TemplateModule = require('../lib/TemplateModule'); | ||
const should = require('should'); | ||
|
||
describe('Template module', function() { | ||
before(function(done) { | ||
// do initialisation here | ||
}); | ||
describe('#functionName()', function() { | ||
it('should test for something', function() { | ||
false.should.be(true); | ||
}); | ||
}); | ||
}); |