Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue/2824-jsx Changed bundler and added React support #2829

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7590e9e
issue/2824 Replaced requirejs with rollup for module bundler
olivermartinfoster Jul 3, 2020
5ecc02f
issue/2824 Register native ES6 modules by name in require on client-side
olivermartinfoster Jul 3, 2020
4f143d0
issue/2824 Moved amd-to-es6 into babel-plugin-transform-amd-to-es6
olivermartinfoster Jul 3, 2020
02d302f
issue/2824 Allowed cache path to be defined by outputdir directive
olivermartinfoster Jul 3, 2020
f1c1644
issue/2824 Indentation
olivermartinfoster Jul 3, 2020
8c55234
issue/2824 Indentation
olivermartinfoster Jul 3, 2020
8fb3289
issue/2824 Better --disable-cache control
olivermartinfoster Jul 3, 2020
1090d84
issue/2824 Better separation of tasks
olivermartinfoster Jul 3, 2020
95df6d5
issue/2824 Clear cache on non-code error
olivermartinfoster Jul 4, 2020
6eb366d
issue/2824 Clear cache on non-code error
olivermartinfoster Jul 4, 2020
3cb343c
issue/2824 Converted app.js and adapt.js to ES6 modules
olivermartinfoster Jul 4, 2020
6eaae52
issue/2824 Fixed debugging in ie11 and bug in a11y.popup
olivermartinfoster Jul 4, 2020
768d479
issue/2824-jsx React view variety
olivermartinfoster Jul 5, 2020
987b06b
issue/2824 Added cache invalidation
olivermartinfoster Jul 6, 2020
58b62be
issue/2824 Invalidate cache once only, bump plugin version
olivermartinfoster Jul 6, 2020
523abea
issue/2824-jsx Invalidate cache only once
olivermartinfoster Jul 6, 2020
69001dc
issue/2824 Updated integrations with templates
olivermartinfoster Jul 6, 2020
92fa97b
Merged with master
olivermartinfoster Jul 7, 2020
987a5cf
Merged with master
olivermartinfoster Jul 7, 2020
4d1ba94
Merged with issue/2824
olivermartinfoster Jul 8, 2020
59a23ad
issue/2824-jsx React development libraries on grunt dev, reintroduce …
olivermartinfoster Jul 15, 2020
b5b8f24
Merge branch 'issue/2824-jsx' of https://github.com/adaptlearning/ada…
olivermartinfoster Jul 15, 2020
9b3a7b0
issue/2824-jsx Recommendations
olivermartinfoster Jul 31, 2020
327a793
issue/2824-jsx Recommendations
olivermartinfoster Jul 31, 2020
416ffb3
Merge remote-tracking branch 'origin' into issue/2824-jsx
olivermartinfoster Aug 3, 2020
87f15ed
issue/2824-jsx Missing variable mobileInstruction
oliverfoster Aug 13, 2020
175dd07
issue/2824-jsx React img[loading] fix and recommendations
olivermartinfoster Aug 14, 2020
5e2a0c6
issue/2824-jsx Typo
olivermartinfoster Aug 14, 2020
85251d7
issue/2824-jsx Resolved merge conflicts
olivermartinfoster Aug 22, 2020
9bc56c1
Merge branch 'master' into issue/2824-jsx
oliverfoster Aug 29, 2020
50c41dc
issue/2824-jsx Typo
oliverfoster Sep 7, 2020
9886d86
issue/2824-jsx fix missing HTMLReactParser + linting
olivermartinfoster Sep 23, 2020
d5704c8
issue/2824-jsx merged master
olivermartinfoster Sep 23, 2020
9dae09d
issue/2824-jsx Added linting directive for ReactDOM global
olivermartinfoster Sep 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions config.js

This file was deleted.

61 changes: 0 additions & 61 deletions grunt/config/babel.js

This file was deleted.

3 changes: 2 additions & 1 deletion grunt/config/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module.exports = {
},
output: {
src: [
'<%= outputdir %>'
'<%= outputdir %>/*',
'!<%= outputdir %>.cache'
]
},
temp: {
Expand Down
93 changes: 82 additions & 11 deletions grunt/config/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module.exports = function(grunt, options) {
options: {
name: 'core/js/app',
baseUrl: '<%= sourcedir %>',
mainConfigFile: './config.js',
out: '<%= tempdir %>adapt.min.js',
out: '<%= outputdir %>adapt/js/adapt.min.js',
cachePath: '<%= outputdir %>.cache',
// fetch these bower plugins an add them as dependencies to the app.js
plugins: [
'<%= sourcedir %>components/*/bower.json',
Expand All @@ -18,12 +18,46 @@ module.exports = function(grunt, options) {
pluginsFilter: function(filepath) {
return grunt.config('helpers').includedFilter(filepath);
},
generateSourceMaps: true,
sourceMaps: {
baseUrl: '../../'
umdImports: [
'../node_modules/object.assign/dist/browser.js',
'../node_modules/react/umd/react.development.js',
'../node_modules/react-dom/umd/react-dom.development.js',
'../node_modules/html-react-parser/dist/html-react-parser.min.js'
],
reactTemplates: [
'<%= sourcedir %>core/templates/**/*.jsx',
'<%= sourcedir %>components/*/templates/**/*.jsx',
'<%= sourcedir %>extensions/*/templates/**/*.jsx',
'<%= sourcedir %>menu/*/templates/**/*.jsx',
'<%= sourcedir %>theme/*/templates/**/*.jsx'
oliverfoster marked this conversation as resolved.
Show resolved Hide resolved
],
external: {
jquery: 'empty:',
underscore: 'empty:',
backbone: 'empty:',
modernizr: 'empty:',
handlebars: 'empty:',
velocity: 'empty:',
imageReady: 'empty:',
inview: 'empty:',
a11y: 'empty:',
scrollTo: 'empty:',
libraries: 'empty:',
bowser: 'empty:',
'core/js/libraries/bowser': 'empty:',
'coreJS/libraries/bowser': 'empty:'
},
map: {
coreJS: 'core/js',
coreViews: 'core/js/views',
coreModels: 'core/js/models',
coreCollections: 'core/js/collections',
coreHelpers: 'core/js/helpers',
// This library from the media component has a circular reference to core/js/adapt, it should be loaded after Adapt
// It needs to be moved from the libraries folder to the js folder
'libraries/mediaelement-fullscreen-hook': '../libraries/mediaelement-fullscreen-hook'
},
preserveLicenseComments: false,
optimize: 'none'
generateSourceMaps: true
},
// newer configuration
files: {
Expand All @@ -36,8 +70,8 @@ module.exports = function(grunt, options) {
options: {
name: 'core/js/app',
baseUrl: '<%= sourcedir %>',
mainConfigFile: './config.js',
out: '<%= tempdir %>adapt.min.js',
out: '<%= outputdir %>adapt/js/adapt.min.js',
cachePath: '<%= outputdir %>.cache',
// fetch these bower plugins an add them as dependencies to the app.js
plugins: [
'<%= sourcedir %>components/*/bower.json',
Expand All @@ -50,8 +84,45 @@ module.exports = function(grunt, options) {
pluginsFilter: function(filepath) {
return grunt.config('helpers').includedFilter(filepath);
},
preserveLicenseComments: false,
optimize: 'none'
umdImports: [
'../node_modules/object.assign/dist/browser.js',
'../node_modules/react/umd/react.production.min.js',
'../node_modules/react-dom/umd/react-dom.production.min.js',
'../node_modules/html-react-parser/dist/html-react-parser.min.js'
],
reactTemplates: [
'<%= sourcedir %>core/templates/**/*.jsx',
'<%= sourcedir %>components/*/templates/**/*.jsx',
'<%= sourcedir %>extensions/*/templates/**/*.jsx',
'<%= sourcedir %>menu/*/templates/**/*.jsx',
'<%= sourcedir %>theme/*/templates/**/*.jsx'
oliverfoster marked this conversation as resolved.
Show resolved Hide resolved
],
external: {
jquery: 'empty:',
underscore: 'empty:',
backbone: 'empty:',
modernizr: 'empty:',
handlebars: 'empty:',
velocity: 'empty:',
imageReady: 'empty:',
inview: 'empty:',
a11y: 'empty:',
scrollTo: 'empty:',
libraries: 'empty:',
bowser: 'empty:',
'core/js/libraries/bowser': 'empty:',
'coreJS/libraries/bowser': 'empty:'
},
map: {
coreJS: 'core/js',
coreViews: 'core/js/views',
coreModels: 'core/js/models',
coreCollections: 'core/js/collections',
coreHelpers: 'core/js/helpers',
// This library from the media component has a circular reference to core/js/adapt, it should be loaded after Adapt
// It needs to be moved from the libraries folder to the js folder
'libraries/mediaelement-fullscreen-hook': '../libraries/mediaelement-fullscreen-hook'
}
}
}
};
Expand Down
7 changes: 5 additions & 2 deletions grunt/config/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ module.exports = {
tasks: ['newer:copy:courseAssets']
},
js: {
files: ['<%= sourcedir %>**/*.js'],
tasks: ['javascript:dev', 'babel:dev', 'clean:temp']
files: ['<%= sourcedir %>**/*.js', '<%= sourcedir %>**/*.jsx'],
options: {
spawn: false
},
tasks: ['javascript:dev', 'clean:temp']
},
componentsAssets: {
files: ['<%= sourcedir %>components/**/assets/**'],
Expand Down
1 change: 0 additions & 1 deletion grunt/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = function(grunt) {
'language-data-manifests',
'handlebars',
'javascript:compile',
'babel:compile',
'clean:dist',
'less:compile',
'replace',
Expand Down
1 change: 0 additions & 1 deletion grunt/tasks/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = function(grunt) {
'language-data-manifests',
'handlebars',
'javascript:dev',
'babel:dev',
'less:dev',
'replace',
'scripts:adaptpostbuild',
Expand Down
1 change: 0 additions & 1 deletion grunt/tasks/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = function(grunt) {
'language-data-manifests',
'newer:handlebars:compile',
'newer:javascript:dev',
'babel:dev',
'newer:less:dev',
'replace',
'scripts:adaptpostbuild',
Expand Down
Loading