Skip to content

Commit

Permalink
Merge pull request #34031 from dimagi/jls/sentry-paths-config
Browse files Browse the repository at this point in the history
Added requirejs config for sentry
  • Loading branch information
orangejenny authored Jan 25, 2024
2 parents 6a348a9 + 6a8fd04 commit decdc13
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
/* globals requirejs */
requirejs.config({
baseUrl: '/static/',
paths: {
"jquery": "jquery/dist/jquery.min",
"underscore": "underscore/underscore",
"bootstrap": "bootstrap/dist/js/bootstrap.min",
"knockout": "knockout/build/output/knockout-latest.debug",
"ko.mapping": "hqwebapp/js/lib/knockout_plugins/knockout_mapping.ko.min",
"datatables": "datatables.net/js/jquery.dataTables.min",
"datatables.fixedColumns": "datatables-fixedcolumns/js/dataTables.fixedColumns",
"datatables.bootstrap": "datatables-bootstrap3/BS3/assets/js/datatables",
"datatables.fixedColumns": "datatables-fixedcolumns/js/dataTables.fixedColumns",
"jquery": "jquery/dist/jquery.min",
"knockout": "knockout/build/output/knockout-latest.debug",
"ko.mapping": "hqwebapp/js/lib/knockout_plugins/knockout_mapping.ko.min",
"sentry_browser": "sentry/js/sentry.browser.7.28.0.min",
"sentry_captureconsole": "sentry/js/sentry.captureconsole.7.28.0.min",
"underscore": "underscore/underscore",
},
shim: {
"accounting/js/lib/stripe": { exports: 'Stripe' },
"ace-builds/src-min-noconflict/ace": { exports: "ace" },
"bootstrap": { deps: ['jquery'] },
"ko.mapping": { deps: ['knockout'] },
"hqwebapp/js/bootstrap3/hq.helpers": { deps: ['jquery', 'bootstrap', 'knockout', 'underscore'] },
"datatables.bootstrap": { deps: ['datatables'] },
"d3/d3.min": {
"exports": "d3",
},
"hqwebapp/js/bootstrap3/hq.helpers": { deps: ['jquery', 'bootstrap', 'knockout', 'underscore'] },
"hqwebapp/js/lib/modernizr": {
exports: 'Modernizr',
},
"jquery.rmi/jquery.rmi": {
deps: ['jquery', 'knockout', 'underscore'],
exports: 'RMI',
},
"accounting/js/lib/stripe": { exports: 'Stripe' },
"d3/d3.min": {
"exports": "d3",
},
"ko.mapping": { deps: ['knockout'] },
"nvd3/nv.d3.min": {
deps: ['d3/d3.min'],
exports: 'nv',
},
"hqwebapp/js/lib/modernizr": {
exports: 'Modernizr',
},
"sentry_browser": { exports: "Sentry" },
},
packages: [{
name: 'moment',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
/* globals requirejs */
requirejs.config({
baseUrl: '/static/',
paths: {
"es6": "requirejs-babel7/es6",
"babel": "@babel/standalone/babel.min",
"babel-plugin-transform-modules-requirejs-babel": "babel-plugin-transform-modules-requirejs-babel/index",
"jquery": "jquery/dist/jquery.min",
"underscore": "underscore/underscore",
"bootstrap": "bootstrap/dist/js/bootstrap.min",
"bootstrap5": "bootstrap5/dist/js/bootstrap.bundle.min",
"knockout": "knockout/build/output/knockout-latest.debug",
"ko.mapping": "hqwebapp/js/lib/knockout_plugins/knockout_mapping.ko.min",
"datatables": "datatables.net/js/jquery.dataTables.min",
"datatables.bootstrap": "datatables.net-bs5/js/dataTables.bootstrap5.min",
"datatables.fixedColumns": "datatables.net-fixedcolumns/js/dataTables.fixedColumns.min",
"datatables.fixedColumns.bootstrap": "datatables.net-fixedcolumns/js/dataTables.fixedColumns.min",
"datatables.bootstrap": "datatables.net-bs5/js/dataTables.bootstrap5.min",
"datepicker": "@eonasdan/tempus-dominus/dist/js/jQuery-provider.min", // import this if you need jquery plugin of tempus-dominus
"es6": "requirejs-babel7/es6",
"jquery": "jquery/dist/jquery.min",
"knockout": "knockout/build/output/knockout-latest.debug",
"ko.mapping": "hqwebapp/js/lib/knockout_plugins/knockout_mapping.ko.min",
"popper": "@popperjs/core/dist/umd/popper.min",
"sentry_browser": "sentry/js/sentry.browser.7.28.0.min",
"sentry_captureconsole": "sentry/js/sentry.captureconsole.7.28.0.min",
"tempus-dominus": "eonasdan/tempus-dominus/dist/js/tempus-dominus.min",
"datepicker": "@eonasdan/tempus-dominus/dist/js/jQuery-provider.min", // import this if you need jquery plugin of tempus-dominus
"underscore": "underscore/underscore",
},
shim: {
"accounting/js/lib/stripe": { exports: 'Stripe' },
"ace-builds/src-min-noconflict/ace": { exports: "ace" },
"ko.mapping": { deps: ['knockout'] },
"hqwebapp/js/bootstrap5/hq.helpers": { deps: ['jquery', 'knockout', 'underscore'] },
"datatables.bootstrap": { deps: ['datatables'] },
"datatables.fixedColumns.bootstrap": { deps: ['datatables.fixedColumns'] },
"jquery.rmi/jquery.rmi": {
deps: ['jquery', 'knockout', 'underscore'],
exports: 'RMI',
"datepicker": {
deps: ['popper', 'tempus-dominus'],
},
"accounting/js/lib/stripe": { exports: 'Stripe' },
"d3/d3.min": {
"exports": "d3",
},
"nvd3/nv.d3.min": {
deps: ['d3/d3.min'],
exports: 'nv',
},
"hqwebapp/js/bootstrap5/hq.helpers": { deps: ['jquery', 'knockout', 'underscore'] },
"hqwebapp/js/lib/modernizr": {
exports: 'Modernizr',
},
"datepicker": {
deps: ['popper', 'tempus-dominus'],
"jquery.rmi/jquery.rmi": {
deps: ['jquery', 'knockout', 'underscore'],
exports: 'RMI',
},
"ko.mapping": { deps: ['knockout'] },
"nvd3/nv.d3.min": {
deps: ['d3/d3.min'],
exports: 'nv',
},
"sentry_browser": { exports: "Sentry" },
},
packages: [{
name: 'moment',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ skipDirOptimize: true # could turn this off to minify everything
generateSourceMaps: false
optimize: none
fileExclusionRegExp: ^\.|\.css$
paths:
sentry_browser: "empty:"
sentry_captureconsole: "empty:"
modules:
# These two modules are referenced in hqwebapp/base.html, not in a requirejs_main tag,
# so they won't get picked up by build_requirejs.py and instead need to be specified here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ skipDirOptimize: true # could turn this off to minify everything
generateSourceMaps: false
optimize: none
fileExclusionRegExp: ^\.|\.css$
paths:
sentry_browser: "empty:"
sentry_captureconsole: "empty:"
modules:
# These two modules are referenced in hqwebapp/base.html, not in a requirejs_main tag,
# so they won't get picked up by build_requirejs.py and instead need to be specified here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
- $("input[type='submit']", $elem).button();
$("input[type='text'], input[type='password'], textarea", $elem);
$('.config', $elem).wrap('<div />').parent().addClass('container block ui-corner-all');

@@ -129,7 +129,7 @@
'use strict';
var key;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,48 @@
---
+++
@@ -2,21 +2,29 @@
@@ -1,26 +1,37 @@
requirejs.config({
baseUrl: '/static/',
paths: {
+ "es6": "requirejs-babel7/es6",
+ "babel": "@babel/standalone/babel.min",
+ "babel-plugin-transform-modules-requirejs-babel": "babel-plugin-transform-modules-requirejs-babel/index",
"jquery": "jquery/dist/jquery.min",
"underscore": "underscore/underscore",
"bootstrap": "bootstrap/dist/js/bootstrap.min",
+ "bootstrap5": "bootstrap5/dist/js/bootstrap.bundle.min",
"knockout": "knockout/build/output/knockout-latest.debug",
"ko.mapping": "hqwebapp/js/lib/knockout_plugins/knockout_mapping.ko.min",
"datatables": "datatables.net/js/jquery.dataTables.min",
- "datatables.fixedColumns": "datatables-fixedcolumns/js/dataTables.fixedColumns",
- "datatables.bootstrap": "datatables-bootstrap3/BS3/assets/js/datatables",
- "datatables.fixedColumns": "datatables-fixedcolumns/js/dataTables.fixedColumns",
+ "datatables.bootstrap": "datatables.net-bs5/js/dataTables.bootstrap5.min",
+ "datatables.fixedColumns": "datatables.net-fixedcolumns/js/dataTables.fixedColumns.min",
+ "datatables.fixedColumns.bootstrap": "datatables.net-fixedcolumns/js/dataTables.fixedColumns.min",
+ "datatables.bootstrap": "datatables.net-bs5/js/dataTables.bootstrap5.min",
+ "datepicker": "@eonasdan/tempus-dominus/dist/js/jQuery-provider.min", // import this if you need jquery plugin of tempus-dominus
+ "es6": "requirejs-babel7/es6",
"jquery": "jquery/dist/jquery.min",
"knockout": "knockout/build/output/knockout-latest.debug",
"ko.mapping": "hqwebapp/js/lib/knockout_plugins/knockout_mapping.ko.min",
+ "popper": "@popperjs/core/dist/umd/popper.min",
"sentry_browser": "sentry/js/sentry.browser.7.28.0.min",
"sentry_captureconsole": "sentry/js/sentry.captureconsole.7.28.0.min",
+ "tempus-dominus": "eonasdan/tempus-dominus/dist/js/tempus-dominus.min",
+ "datepicker": "@eonasdan/tempus-dominus/dist/js/jQuery-provider.min", // import this if you need jquery plugin of tempus-dominus
"underscore": "underscore/underscore",
},
shim: {
"accounting/js/lib/stripe": { exports: 'Stripe' },
"ace-builds/src-min-noconflict/ace": { exports: "ace" },
- "bootstrap": { deps: ['jquery'] },
"ko.mapping": { deps: ['knockout'] },
- "hqwebapp/js/bootstrap3/hq.helpers": { deps: ['jquery', 'bootstrap', 'knockout', 'underscore'] },
+ "hqwebapp/js/bootstrap5/hq.helpers": { deps: ['jquery', 'knockout', 'underscore'] },
"datatables.bootstrap": { deps: ['datatables'] },
+ "datatables.fixedColumns.bootstrap": { deps: ['datatables.fixedColumns'] },
"jquery.rmi/jquery.rmi": {
deps: ['jquery', 'knockout', 'underscore'],
exports: 'RMI',
@@ -32,6 +40,9 @@
"hqwebapp/js/lib/modernizr": {
exports: 'Modernizr',
},
+ "datepicker": {
+ deps: ['popper', 'tempus-dominus'],
+ },
},
packages: [{
name: 'moment',
@@ -44,7 +55,7 @@
"d3/d3.min": {
"exports": "d3",
},
- "hqwebapp/js/bootstrap3/hq.helpers": { deps: ['jquery', 'bootstrap', 'knockout', 'underscore'] },
+ "hqwebapp/js/bootstrap5/hq.helpers": { deps: ['jquery', 'knockout', 'underscore'] },
"hqwebapp/js/lib/modernizr": {
exports: 'Modernizr',
},
@@ -46,7 +57,7 @@
},
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
+ border-top: 1px solid $cc-neutral-hi;
padding-top: 8px;
margin-top:10px;

0 comments on commit decdc13

Please sign in to comment.