adapt-project 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/releases.yml +3 -2
- package/README.md +1 -1
- package/lib/Framework.js +13 -2
- package/package.json +1 -1
|
@@ -15,13 +15,14 @@ jobs:
|
|
|
15
15
|
id-token: write # to enable use of OIDC for trusted publishing and npm provenance
|
|
16
16
|
steps:
|
|
17
17
|
- name: Checkout
|
|
18
|
-
uses: actions/checkout@
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
19
|
with:
|
|
20
20
|
fetch-depth: 0
|
|
21
21
|
- name: Setup Node.js
|
|
22
|
-
uses: actions/setup-node@
|
|
22
|
+
uses: actions/setup-node@v4
|
|
23
23
|
with:
|
|
24
24
|
node-version: 'lts/*'
|
|
25
|
+
registry-url: https://registry.npmjs.org
|
|
25
26
|
- name: Update npm
|
|
26
27
|
run: npm install -g npm@latest
|
|
27
28
|
- name: Install dependencies
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# adapt-project
|
|
2
2
|
|
|
3
|
-
Node.js library for managing Adapt Learning Framework projects — plugins, schemas, course data, and translations.
|
|
3
|
+
Node.js library for managing Adapt Learning Framework projects — plugins, schemas, course data, and translations.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
package/lib/Framework.js
CHANGED
|
@@ -31,7 +31,7 @@ class Framework {
|
|
|
31
31
|
outputPath = path.join(rootPath, '/build/'),
|
|
32
32
|
sourcePath = path.join(rootPath, '/src/'),
|
|
33
33
|
courseDir = 'course',
|
|
34
|
-
includedFilter =
|
|
34
|
+
includedFilter = null,
|
|
35
35
|
jsonext = 'json',
|
|
36
36
|
trackingIdType = 'block',
|
|
37
37
|
useOutputData = false,
|
|
@@ -46,7 +46,7 @@ class Framework {
|
|
|
46
46
|
this.sourcePath = path.resolve(this.rootPath, sourcePath).replace(/\\/g, '/').replace(/\/?$/, '/')
|
|
47
47
|
/** @type {string} */
|
|
48
48
|
this.courseDir = courseDir
|
|
49
|
-
/** @type {function} */
|
|
49
|
+
/** @type {function|null} */
|
|
50
50
|
this.includedFilter = includedFilter
|
|
51
51
|
/** @type {string} */
|
|
52
52
|
this.jsonext = jsonext
|
|
@@ -82,6 +82,17 @@ class Framework {
|
|
|
82
82
|
return this.getPackageJSONFileItem().item.version
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
get includedFilter () {
|
|
86
|
+
if (!this._includedFilter) {
|
|
87
|
+
this._includedFilter = this.makeIncludeFilter()
|
|
88
|
+
}
|
|
89
|
+
return this._includedFilter
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
set includedFilter (filterFunction) {
|
|
93
|
+
this._includedFilter = filterFunction
|
|
94
|
+
}
|
|
95
|
+
|
|
85
96
|
/**
|
|
86
97
|
* Returns a Data instance for either the src/course or build/course folder
|
|
87
98
|
* depending on the specification of the useOutputData property on either the
|