-
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.
Merge pull request #4 from oat-sa/release-0.3.0
Release 0.3.0
- v2.5.2
- v2.5.1
- v2.5.0
- v2.4.0
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.3
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.0
- v2.0.1
- v2.0.0
- v1.11.3
- v1.11.2
- v1.11.1
- v1.11.0
- v1.10.1
- v1.10.0
- v1.9.6
- v1.9.5
- v1.9.4
- v1.9.3
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.0
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.7
- v1.6.6
- v1.6.5
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.4
- v1.3.4-1
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.10
- v1.1.9
- v1.1.8
- v1.1.8-1
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
- v0.30.0
- v0.29.2
- v0.29.1
- v0.29.0
- v0.28.0
- v0.27.3
- v0.27.2
- v0.27.1
- v0.27.0
- v0.26.2
- v0.26.1
- v0.26.0
- v0.25.0
- v0.24.2
- v0.24.1
- v0.24.0
- v0.23.1
- v0.23.0
- v0.22.1
- v0.22.0
- v0.21.12
- v0.21.11
- v0.21.10
- v0.21.9
- v0.21.8
- v0.21.7
- v0.21.6
- v0.21.5
- v0.21.4
- v0.21.3
- v0.21.2
- v0.21.1
- v0.21.0
- v0.20.0
- v0.19.3
- v0.19.2
- v0.19.1
- v0.19.0
- v0.18.0
- v0.17.3
- v0.17.2
- v0.17.1
- v0.17.0
- v0.16.0
- v0.15.6
- v0.15.5
- v0.15.4
- v0.15.3
- v0.15.2
- v0.15.1
- v0.15.0
- v0.14.2
- v0.14.1
- v0.14.0
- v0.13.1
- v0.13.0-5
- v0.13.0-3
- v0.13.0-2
- v0.13.0-1
- v0.11.3
- v0.11.1
- v0.11.0
- v0.10.9
- v0.10.8
- v0.10.7
- v0.10.6
- v0.10.5
- v0.10.4
- v0.10.1
- v0.10.0
- v0.8.0
- v0.7.0
- v0.6.1
- v0.6.0
- v0.5.0
- v0.4.21
- v0.4.20
- v0.4.19
- v0.4.18
- v0.4.17
- v0.4.15
- v0.4.14
- v0.3.1
- v0.3.0
- 0.13.2
- 0.13.0
- 0.13.0-4
- 0.12.0
- 0.11.2
- 0.10.3
- 0.10.2
- 0.9.0
- 0.6.2
- 0.4.18-1
- 0.4.16
- 0.4.13
- 0.4.12
- 0.4.10
- 0.4.9
- 0.4.8
- 0.4.8-2
- 0.4.8-1
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.4-1
- 0.4.3
- 0.4.2
- 0.4.2-1
- 0.4.1
- 0.4.0
- 0.3.2
- 0.3.1-1
Showing
705 changed files
with
90,131 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,34 @@ | ||
pipeline { | ||
agent { | ||
label 'master' | ||
} | ||
stages { | ||
stage('Frontend Tests') { | ||
agent { | ||
docker { | ||
image 'btamas/puppeteer-git' | ||
reuseNode true | ||
} | ||
} | ||
environment { | ||
HOME = '.' | ||
PARALLEL_TESTS = 2 | ||
} | ||
options { | ||
skipDefaultCheckout() | ||
} | ||
steps { | ||
dir('.') { | ||
sh( | ||
label: 'Setup frontend toolchain', | ||
script: 'npm install' | ||
) | ||
sh ( | ||
label : 'Run frontend tests', | ||
script: 'npm run test' | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} |
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,71 @@ | ||
{ | ||
"env" : { | ||
"browser" : true, | ||
"es6" : true, | ||
"qunit" : true, | ||
"node" : true | ||
}, | ||
"globals" : { | ||
"ENVIRONMENT" : true | ||
}, | ||
"plugins" : ["es", "jsdoc"], | ||
"parserOptions" : { | ||
"sourceType" : "module", | ||
"ecmaVersion" : 2015 | ||
}, | ||
"extends" : "eslint:recommended", | ||
"rules" : { | ||
"array-bracket-newline" : ["warn", "consistent"], | ||
"arrow-body-style" : ["error", "as-needed"], | ||
"arrow-spacing" : ["warn", { "before" : true, "after" : true }], | ||
"brace-style" : ["warn", "1tbs"], | ||
"consistent-this" : ["error", "self"], | ||
"eqeqeq" : ["error", "smart"], | ||
"es/no-classes" : ["error"], | ||
"es/no-generators" : ["error"], | ||
"func-call-spacing" : ["error"], | ||
"implicit-arrow-linebreak" : ["error"], | ||
"indent" : ["warn", 4, { "SwitchCase" : 1, "MemberExpression" : "off" }], | ||
"jsdoc/check-alignment" : ["warn"], | ||
"jsdoc/check-param-names" : ["warn"], | ||
"jsdoc/require-param" : ["warn"], | ||
"jsdoc/require-param-name" : ["warn"], | ||
"jsdoc/require-param-type" : ["warn"], | ||
"jsdoc/require-returns" : ["warn"], | ||
"jsdoc/require-returns-check" : ["warn"], | ||
"jsdoc/require-returns-type" : ["warn"], | ||
"linebreak-style" : ["error", "unix"], | ||
"new-parens" : ["error"], | ||
"no-alert" : ["error"], | ||
"no-caller" : ["error"], | ||
"no-confusing-arrow" : ["error", { "allowParens" : false }], | ||
"no-console" : ["error"], | ||
"no-debugger" : ["error"], | ||
"no-duplicate-imports" : ["error"], | ||
"no-eval" : ["error"], | ||
"no-extend-native" : ["error"], | ||
"no-extra-bind" : ["error"], | ||
"no-implicit-globals" : ["error"], | ||
"no-implied-eval" : ["error"], | ||
"no-lone-blocks" : ["error"], | ||
"no-multi-assign" : ["error"], | ||
"no-new-func" : ["error"], | ||
"no-script-url" : ["error"], | ||
"no-self-compare" : ["error"], | ||
"no-sequences" : ["error"], | ||
"no-shadow" : ["error", { "hoist" : "functions" }], | ||
"no-template-curly-in-string" : ["error"], | ||
"no-throw-literal" : ["error"], | ||
"no-trailing-spaces" : ["error"], | ||
"no-undefined" : ["error"], | ||
"no-use-before-define" : ["error", { "functions" : false }], | ||
"no-useless-call" : ["error"], | ||
"no-useless-computed-key" : ["error"], | ||
"no-useless-rename" : ["error"], | ||
"prefer-rest-params" : ["error"], | ||
"prefer-spread" : ["error"], | ||
"prefer-template" : ["error"], | ||
"semi" : ["error", "always"], | ||
"vars-on-top" : ["error"] | ||
} | ||
} |
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 |
---|---|---|
|
@@ -59,3 +59,5 @@ typings/ | |
|
||
# next.js build output | ||
.next | ||
|
||
dist |
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,16 @@ | ||
# tao-item-runner-qti-fe | ||
|
||
QTI Item Runner frontend library of TAO. | ||
|
||
Available scripts in the project: | ||
|
||
- `HOST=<host> PORT=<port> npm run test <testname>`: run test suite | ||
- `HOST` (optional environment variable, default: 127.0.0.1): Test server listen host | ||
- `PORT` (optional environment variable, default: 8082): Test server listen port | ||
- `testname` (optional): Specific test to run. If it is not provided, all will be ran. | ||
- `HOST=<host> PORT=<port> npm run test:keepAlive`: start test server | ||
- `HOST` (optional environment variable, default: 127.0.0.1): Test server listen host | ||
- `PORT` (optional environment variable, default: 8082): Test server listen port | ||
- `npm run build`: build for production into `dist` directory | ||
- `npm run build:watch`: build for production into `dist` directory and watch for changes | ||
- `npm run lint`: check syntax of code |
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,31 @@ | ||
/** | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; under version 2 | ||
* of the License (non-upgradable). | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2019 (original work) Open Assessment Technologies SA ; | ||
*/ | ||
|
||
export default (externals = []) => ({ | ||
name: 'external-alias', // this name will show up in warnings and errors | ||
resolveId(source, importer) { | ||
if (importer && externals.find(external => source.startsWith(external))) { | ||
return { | ||
id: source, | ||
external: true, | ||
moduleSideEffects: true | ||
}; | ||
} | ||
return null; // other ids should be handled as usually | ||
} | ||
}); |
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,33 @@ | ||
/** | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; under version 2 | ||
* of the License (non-upgradable). | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2019 (original work) Open Assessment Technologies SA ; | ||
*/ | ||
|
||
/** | ||
* This file contains path definitions for build scripts. | ||
*/ | ||
const path = require('path'); | ||
const rootPath = path.resolve(__dirname, '..'); | ||
const srcDir = path.resolve(rootPath, 'src'); | ||
|
||
module.exports = { | ||
rootPath, | ||
srcDir, | ||
testDir: path.resolve(rootPath, 'test'), | ||
outputDir: path.resolve(rootPath, 'dist'), | ||
testOutputDir: path.resolve(rootPath, 'test'), | ||
aliases: { taoQtiItem: srcDir, build: path.resolve(rootPath, 'build') } | ||
}; |
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,144 @@ | ||
/** | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; under version 2 | ||
* of the License (non-upgradable). | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2019 (original work) Open Assessment Technologies SA ; | ||
*/ | ||
|
||
import path from 'path'; | ||
import glob from 'glob'; | ||
import alias from 'rollup-plugin-alias'; | ||
import handlebarsPlugin from 'rollup-plugin-handlebars-plus'; | ||
import externalAlias from './external-alias'; | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import json from 'rollup-plugin-json'; | ||
|
||
const { srcDir, outputDir, aliases } = require('./path'); | ||
const Handlebars = require('handlebars'); | ||
|
||
/** | ||
* Support of handlebars 1.3.0 | ||
* TODO remove once migrated to hbs >= 3.0.0 | ||
*/ | ||
const originalVisitor = Handlebars.Visitor; | ||
Handlebars.Visitor = function() { | ||
return originalVisitor.call(this); | ||
}; | ||
Handlebars.Visitor.prototype = Object.create(originalVisitor.prototype); | ||
Handlebars.Visitor.prototype.accept = function() { | ||
try { | ||
originalVisitor.prototype.accept.apply(this, arguments); | ||
} catch (e) {} | ||
}; | ||
/* --------------------------------------------------------- */ | ||
|
||
const inputs = glob.sync(path.join(srcDir, '**', '*.js')); | ||
|
||
/** | ||
* Define all modules as external, so rollup won't bundle them together. | ||
*/ | ||
const localExternals = inputs.map( | ||
input => | ||
`taoQtiItem/${path | ||
.relative(srcDir, input) | ||
.replace(/\\/g, '/') | ||
.replace(/\.js$/, '')}` | ||
); | ||
|
||
export default inputs.map(input => { | ||
const name = path.relative(srcDir, input).replace(/\.js$/, ''); | ||
const dir = path.dirname(path.relative(srcDir, input)); | ||
|
||
return { | ||
input, | ||
output: { | ||
dir: path.join(outputDir, dir), | ||
format: 'amd', | ||
name | ||
}, | ||
external: [ | ||
'jquery', | ||
'lodash', | ||
'handlebars', | ||
'i18n', | ||
'module', | ||
'context', | ||
'async', | ||
'require', | ||
|
||
'raphael', | ||
'scale.raphael', | ||
'lib/gamp/gamp', | ||
'class', | ||
'mathJax', | ||
'nouislider', | ||
'interact', | ||
'select2', | ||
'ckeditor', | ||
'iframeNotifier', | ||
|
||
'qtiInfoControlContext', | ||
'qtiCustomInteractionContext', | ||
|
||
...localExternals | ||
], | ||
plugins: [ | ||
externalAlias([ | ||
'core', | ||
'util', | ||
'ui', | ||
'lib', | ||
'taoItems/runner', | ||
'taoItems/assets', | ||
'taoItems/scoring', | ||
'taoQtiItem/portableElementRegistry' | ||
]), | ||
alias({ | ||
resolve: ['.js', '.json', '.tpl'], | ||
...aliases | ||
}), | ||
resolve(), | ||
handlebarsPlugin({ | ||
handlebars: { | ||
id: 'handlebars', | ||
options: { | ||
sourceMap: false | ||
}, | ||
module: Handlebars | ||
}, | ||
helpers: ['build/tpl.js'], | ||
templateExtension: '.tpl' | ||
}), | ||
json({ | ||
preferConst: false | ||
}), | ||
/** | ||
* The following hack is necessary because expressions.js wants to export an object | ||
* containing a key named 'default', and expressions/engine.js needs to import the whole thing. | ||
* By omitting a line from Rollup's generated bundle, we can preserve the full object. | ||
*/ | ||
{ | ||
name: 'expressions_helper', | ||
generateBundle(options, bundle) { | ||
if (options.name.match(/expressions[\/\\]engine/)) { | ||
bundle['engine.js'].code = bundle['engine.js'].code.replace( | ||
/expressionProcessors\.hasOwnProperty\('default'\)/, | ||
false | ||
); | ||
} | ||
} | ||
} | ||
] | ||
}; | ||
}); |
Oops, something went wrong.