canvas-lms/package.json

199 lines
7.5 KiB
JSON
Raw Normal View History

AMD Conversion "Trivial" JavaScript / CoffeeScript changes -------------------------------------------------- For the most part, all javascript was simply wrapped in `require` or `define`. The dependencies were found with a script that matched regexes in the files, it errs on the side of listing too many dependencies, so its worth double checking each file's dependencies (over time, anyway). i18n API changes -------------------------------------------------- No longer have to do I18n.scoped calls, just list i18n as a dependency with the scope and it's imported already scoped require ['i18n!some_scope'], (I18n) -> I18n.t 'im_scoped', 'I'm scoped!' JS bundling now done with r.js, not Jammit -------------------------------------------------- We don't use jammit to bundle JS anymore. Simply list dependencies for your JS modules in the file and RequireJS handles the rest. To optimize the JavaScript, first make sure you have node.js 0.4.12+ installed and then run: $ rake js:build The app defaults to the optimized build in production. You can use non-optimized in production by putting ?debug_assets=true in the url just like before. You can also test the optimized JavaScript in development with ?optimized_js=true. Significant changes -------------------------------------------------- These files have "real" changes to them (unlike the JavaScript that is simply wrapped in require and define). Worth taking a really close look at: - app/helpers/application_helper.rb - app/views/layouts/application.html.erb - config/assets.yml - config/build.js - lib/handlebars/handlebars.rb - lib/i18n_extraction/js_extractor.rb - lib/tasks/canvas.rake - lib/tasks/i18n.rake - lib/tasks/js.rake Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7 Reviewed-on: https://gerrit.instructure.com/6986 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-11 00:31:45 +08:00
{
"name": "canvas-lms",
"license": "AGPL-3.0",
AMD Conversion "Trivial" JavaScript / CoffeeScript changes -------------------------------------------------- For the most part, all javascript was simply wrapped in `require` or `define`. The dependencies were found with a script that matched regexes in the files, it errs on the side of listing too many dependencies, so its worth double checking each file's dependencies (over time, anyway). i18n API changes -------------------------------------------------- No longer have to do I18n.scoped calls, just list i18n as a dependency with the scope and it's imported already scoped require ['i18n!some_scope'], (I18n) -> I18n.t 'im_scoped', 'I'm scoped!' JS bundling now done with r.js, not Jammit -------------------------------------------------- We don't use jammit to bundle JS anymore. Simply list dependencies for your JS modules in the file and RequireJS handles the rest. To optimize the JavaScript, first make sure you have node.js 0.4.12+ installed and then run: $ rake js:build The app defaults to the optimized build in production. You can use non-optimized in production by putting ?debug_assets=true in the url just like before. You can also test the optimized JavaScript in development with ?optimized_js=true. Significant changes -------------------------------------------------- These files have "real" changes to them (unlike the JavaScript that is simply wrapped in require and define). Worth taking a really close look at: - app/helpers/application_helper.rb - app/views/layouts/application.html.erb - config/assets.yml - config/build.js - lib/handlebars/handlebars.rb - lib/i18n_extraction/js_extractor.rb - lib/tasks/canvas.rake - lib/tasks/i18n.rake - lib/tasks/js.rake Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7 Reviewed-on: https://gerrit.instructure.com/6986 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-11 00:31:45 +08:00
"version": "0.0.0",
"engines": {
"node": ">=8.10.0",
"yarn": "1.6.0"
},
"dependencies": {
"@instructure/ui-alerts": "5.4.1-dev.1",
"@instructure/ui-buttons": "5.4.1-dev.1",
"@instructure/ui-core": "^4.8.0",
"@instructure/ui-menu": "5.4.1-dev.1",
"@instructure/ui-overlays": "5.4.1-dev.1",
"@instructure/ui-themeable": "5.4.1-dev.1",
"@instructure/ui-themes": "5.4.1-dev.1",
"apollo-boost": "^0.1.4",
"axios": "^0.16.0",
"backbone": "1.1.1",
"brandable_css": "0.1.0",
"canvas-planner": "file:./packages/canvas-planner/copy-of-what-gets-published-to-npm-registry",
"canvas-rce": "file:./packages/canvas-rce/canvas",
"canvas_offline_course_viewer": "https://github.com/instructure/canvas_offline_course_viewer.git#1.2.0",
"classnames": "^2.2.5",
"color-slicer": "0.8.0",
"d3": "3.5.17",
"formdata-polyfill": "^3.0.9",
"fullcalendar": "https://github.com/instructure/fullcalendar.git#1108dd1c991a029ec6fd7de3337737ec5295ba97",
"graphiql": "^0.11.2",
"graphql": "^0.13.2",
"graphql-tag": "^2.8.0",
"i18n-js": "^3",
"ic-ajax": "~2.0.1",
"ic-tabs": "0.1.3",
"immutability-helper": "^2",
"instructure-icons": "^4",
"jquery": "https://github.com/ryankshaw/jquery.git#a755a3e9c99d5a70d8ea570836f94ae1ba56046d",
"jquery-getscrollbarwidth": "^1.0.0",
"jquery-ui-touch-punch": "^0.2.3",
"jquery.cookie": "^1.4.1",
"jquery.elastic": "1.0.0",
"location-origin": "^1.1.4",
"lodash": "^4.16.4",
"md5": "^2.2.1",
"mediaelement": "https://github.com/instructure/mediaelement.git#master",
"moment": "~2.10.6",
Get slickGrid to work in RTL Closes: CORE-1226 This gets both the old gradebook and the new gradezilla gradebook to work in RTL. Test plan: * in both old gradebook and new gradezilla gradebook: * go to the gradebook in normal LTR interface * everything should work exactly as before * turn on the RTL feature flag either in your user settings or by turning int on in accounts/x/settings and then setting your lang to arabic Specific things to test: * try it on both the old gradebook and the new gradezilla gradebook * try it on a really large gradebook with tons of rows and columns * try a really small gradebook with less columns than there is screen width * try it in different browsers. Since each browser has different scrollLeft handling in RTL, I normalized it. but verify that it works in each * try resizing and reordering columns * borders and other styles should be flipped to the opposite side in RTL * make sure keyboard shortcuts (like the left, right, top, down arrow keys) work and move you in the right direction in both LTR and RTL (Eg: if you are on “assignment 2”, right arrow goes to “assignment 3” In LTR but in RTL it goes back to “assignment 1”) * try to think of other places that might have used the .r<column index> or .l<column index> classnames to make sure the use the new, RTL-aware ‘.b’ and ‘.f’ (those stand for “back” and “front”) classnames This change started from this pull request: https://github.com/mleibman/SlickGrid/pull/666 but there was a lot that still needed to be done there and we needed change things to handle our frozen columns. Some interesting trivia: * in RTL, different browsers have different ways of handling scrollLeft. they all show the element scrolled all the way to the right by default (So you see the first columns) but chrome tells you scrollLeft is some large number to reflect how far from the left you’d have to scroll to get there if you scrolled all the way to the right like it should. Safari says scrollLeft is 0 by default and then as you scroll left to to see the rest of the columns, it counts down and shows a negative number. And IE does something else. So you have to do some trickery to normalize them all to be a consistent value, and that is why this pulled in that NPM module Change-Id: Id00025db0918cbc2d354e96af88023e70e041e58 Reviewed-on: https://gerrit.instructure.com/144672 Tested-by: Jenkins Reviewed-by: Jeremy Neander <jneander@instructure.com> Reviewed-by: Spencer Olson <solson@instructure.com> QA-Review: Tucker McKnight <tmcknight@instructure.com> QA-Review: KC Naegle <knaegle@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com>
2018-03-31 03:07:41 +08:00
"normalize-scroll-left": "^0.1.2",
"page": "visionmedia/page.js#1.6.4",
"parse-decimal-number": "1.0.0",
"prop-types": "^15",
"qs": "https://github.com/hapijs/qs.git#a341cdf2fadba5ede1ce6c95c7051f6f31f37b81",
"react": "0.14.9",
"react-addons-css-transition-group": "0.14.8",
"react-addons-pure-render-mixin": "0.14.8",
"react-apollo": "^2.1.1",
"react-crop": "^4.0.2",
"react-dnd": "2.1.4",
"react-dnd-html5-backend": "2.1.2",
"react-dom": "0.14.9",
"react-modal": "1.6.5",
"react-redux": "4.4.5",
"react-select-box": "https://github.com/instructure-react/react-select-box.git#b1ddd39223d48793fbe3dc4e87aca00d57197b5f",
"react-tokeninput": "2.4.0",
"redux": "^3.5.2",
"redux-actions": "0.11.0",
"redux-thunk": "2.1.0",
"spin.js": "2.3.2",
"swfobject": "^2.2.1",
"tablesorter": "^2.28.5",
"timezone": "1.0.13",
"tinycolor2": "1.4.1",
"tinymce": "4.7.9",
"tinymce-a11y-checker": "~1.4.0",
"tinymce-light-skin": "1.3.1"
},
AMD Conversion "Trivial" JavaScript / CoffeeScript changes -------------------------------------------------- For the most part, all javascript was simply wrapped in `require` or `define`. The dependencies were found with a script that matched regexes in the files, it errs on the side of listing too many dependencies, so its worth double checking each file's dependencies (over time, anyway). i18n API changes -------------------------------------------------- No longer have to do I18n.scoped calls, just list i18n as a dependency with the scope and it's imported already scoped require ['i18n!some_scope'], (I18n) -> I18n.t 'im_scoped', 'I'm scoped!' JS bundling now done with r.js, not Jammit -------------------------------------------------- We don't use jammit to bundle JS anymore. Simply list dependencies for your JS modules in the file and RequireJS handles the rest. To optimize the JavaScript, first make sure you have node.js 0.4.12+ installed and then run: $ rake js:build The app defaults to the optimized build in production. You can use non-optimized in production by putting ?debug_assets=true in the url just like before. You can also test the optimized JavaScript in development with ?optimized_js=true. Significant changes -------------------------------------------------- These files have "real" changes to them (unlike the JavaScript that is simply wrapped in require and define). Worth taking a really close look at: - app/helpers/application_helper.rb - app/views/layouts/application.html.erb - config/assets.yml - config/build.js - lib/handlebars/handlebars.rb - lib/i18n_extraction/js_extractor.rb - lib/tasks/canvas.rake - lib/tasks/i18n.rake - lib/tasks/js.rake Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7 Reviewed-on: https://gerrit.instructure.com/6986 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-11 00:31:45 +08:00
"devDependencies": {
"axe-core": "~2.1.7",
"babel-cli": "^6",
"babel-core": "^6",
"babel-eslint": "^8",
"babel-jest": "^22",
"babel-loader": "^7",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-transform-react-remove-prop-types": "^0.4",
"babel-plugin-transform-runtime": "^6",
"babel-polyfill": "^6",
"babel-preset-env": "^1",
"babel-preset-react": "^6",
"babel-preset-stage-1": "^6",
"babel-register": "^6",
"coffee-loader": "~0.7.2",
"coffee-script": "^1",
"concurrently": "^3",
"core-js-builder": "^2",
"css-loader": "^0.28",
"ember-template-compiler": "^1.8.0",
"enzyme": "^2",
"es-check": "^2",
"eslint": "^4",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2",
"eslint-plugin-import": "^2",
"eslint-plugin-jest": "^21",
"eslint-plugin-jsx-a11y": "^6",
"eslint-plugin-notice": "^0.6",
"eslint-plugin-promise": "^3",
"eslint-plugin-qunit": "^3",
"eslint-plugin-react": "^7",
"exports-loader": "^0.7",
"expose-loader": "^0.7",
"file-loader": "^1.1.10",
"fontfaceobserver": "^2",
"gglobby": "0.0.3",
"glob": "^7",
"gulp": "^3",
"gulp-file": "^0.4",
"gulp-filter": "^5",
"gulp-insert": "^0.5",
"gulp-load-plugins": "^1",
"gulp-rename": "^1",
"gulp-rev": "^8",
"gulp-sourcemaps": "^2",
"gulp-uglify": "^3",
"handlebars": "1.3.0",
"handlebars-loader": "^1",
"happypack": "^3.1.0",
"imports-loader": "^0.8",
"istanbul-instrumenter-loader": "^3",
"jest": "^22",
"jest-junit": "^3",
"jest-localstorage-mock": "^2",
"json-loader": "^0.5.7",
"jsx-loader": "0.11.2",
"karma": "^2",
"karma-chrome-launcher": "^2",
"karma-coverage-istanbul-reporter": "^1",
"karma-firework-reporter": "~0.2.4",
"karma-junit-reporter": "^1",
"karma-qunit": "~1.2.1",
"karma-sourcemap-loader": "^0.3",
"karma-spec-reporter": "^0.0.32",
"karma-verbose-reporter": "^0.0.6",
"karma-webpack": "2.0.6",
"merge-stream": "^1",
"moxios": "^0.4",
"prettier": "^1",
"qunitjs": "^1.14.0",
"react-addons-test-utils": "0.14.8",
"redux-logger": "2.6.1",
"requirejs": "~2.2.0",
make feature flags for Right To Left layout Closes: CORE-1154 There are 2 feature flags here. One a specific user (internal employees, sales people, contractors, etc) can turn on to see where we are and what would still need to be done. And the other is for an account to be able to turn on to let the users in their account that have their language set to an RTL language (eg: Arabic, Farsi or Hebrew) see the interface in RTL This commit is part of a chain of commits. you'll need to apply the ones that follow-on after this to see most of the actual Right To Left features, this commit is mainly just to create the feature flag. Test plan: * go to your user settings page * you should see a feature option for Force RTL Layout” * it should show that it is “in development” * it should should be hidden: eg: only appears for site admins and not For normal users * turn it on (if you have this checked out along with the others that follow beind this commit) * navigate around canvas, most things on most pages should be RTL * you should be able to get an idea of how much more work and what Kind of changes we’d still need to make to get it 100% * now turn off that user feature flag, and go to your account's settings * turn on the "allow users from RTL languages to see RTL layout" account-level feature flag. * nothing should change for you, it should be LTR like normal * set your language to either Arabic, Farsi or Hebrew * now the interface should all be in right to left. (again, you'll need to have the follow-on commits to this to see all of the RTL changes) * without either of the feature flags turned on, absolutely nothing should be different at all anywhere in the interface. Change-Id: Ia78d86fa46d2d289b1913c5d1340546d7f6c3a1f Reviewed-on: https://gerrit.instructure.com/143891 Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com> QA-Review: Jeremy Putnam <jeremyp@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com> Tested-by: Jenkins
2018-03-17 02:25:14 +08:00
"sass-direction": "^1",
"script-loader": "^0.7",
"sinon": "^4",
"style-loader": "^0.20",
"stylelint": "^9",
"through2": "^2",
"webpack": "^3",
"webpack-cleanup-plugin": "^0.5",
"webpack-manifest-plugin": "^1",
"webpack-parallel-uglify-plugin": "^1",
"xsslint": "0.1.4",
"yaml-loader": "^0.5"
},
"jest-junit": {
"output": "./coverage-js/junit-reports/jest.xml"
},
"repository": "instructure/canvas-lms",
"scripts": {
"test": "concurrently --names \"packages,jest,karma\" \"yarn test:packages\" \"jest\" \"if [ \"$COVERAGE\" ]; then yarn test:karma; else yarn test:karma:concurrently; fi\"",
"test:watch": "concurrently --names \"jest,karma\" \"jest --watch .\" \"yarn test:karma:watch\"",
"test:jest": "echo 'this is here just so you know you can use jest, but just use the `jest` cli directly' && jest",
"test:karma": "karma start --single-run",
"test:karma:concurrently": "concurrently --names \"coffee,js1,js2\" \"JSPEC_GROUP=coffee yarn test:karma:headless\" \"JSPEC_GROUP=js1 yarn test:karma:headless\" \"JSPEC_GROUP=js2 yarn test:karma:headless\"",
"test:karma:headless": "karma start --single-run --browsers ChromeHeadlessNoSandbox",
"test:karma:watch": "karma start",
"test:karma:watch:headless": "karma start --browsers ChromeHeadlessNoSandbox",
"test:packages": "script/local-yarn test",
"preinstall": "script/uncache-packages && script/local-yarn install && script/local-yarn build:canvas",
"build": "yarn run build:css && yarn run build:js",
"build:watch": "concurrently \"yarn build:css:watch\" \"yarn build:js:watch\"",
"build:css": "brandable_css",
"build:css:watch": "brandable_css --watch",
"build:js": "yarn run webpack-development",
"build:js:watch": "yarn run webpack",
"build:packages": "script/yarn-packages build",
"lint:browser-code": "es-check es5 ./public/dist/**/*.js",
eliminate the need to run karma & webpack separately TL;DR: running JS tests in canvas will be a lot faster & simpler What you need to know as a developer writing JS in canvas: Lets say you are working on the “dashboard_cards” feature, just run: `npm run jspec-watch spec/javascripts/jsx/dashboard_card` While you write code and it will have a watcher that catches any changes and re-runs just the dashboar_card specs if you save any file that went into it. It should run & reload in less than a few seconds. You can give it the path to a specific spec file or have it run an entire directory. Or, if you are working on something that might touch a lot of stuff, run: `npm run test-watch` and while you are changing stuff, it will run *all* the QUnit specs on any change. It should only take a couple seconds for webpack to process the file change and to reload the specs in the browser. Jenkins can now just run “npm test” for the webpack build. No need to bundle install then run rake tasks just to run js tests. This change also starts warning you when you have specs that take a long time to run (e.g.: https://cl.ly/2i1O3O0J1504). It turns out we have some *really* slow js specs (like selenium-level slow) so if you notice a slow spec that you our your team wrote, please fix it. Longer details: To test our JS in webpack, we used to 1. run webpack with an env var set so it only does our ember stuff 2. run karma against ember 3. run webpack again against all the rest of the specs canvas 4 run karma again against all the specs in canvas that took a long time. this change makes it so both the ember specs and the specs in the rest of canvas run all in the same karma. it also makes it so karma runs webpack itself. so you don’t need to run `npm run webpack-test && karma start` to run tests, just `npm run test` (which is just an alias to `karma start`). it also means there is now just one watcher (karma) instead of one for both webpack and karma. Closes: CNVS-34977 Test plan: * Jenkins builds should pass * Try running different variations of the commands up there in the description. They should work and be fast-ish. Change-Id: Ia97f9bfa3677763f218f5f02c9463344f180bc6c Reviewed-on: https://gerrit.instructure.com/102169 Reviewed-by: Clay Diffrient <cdiffrient@instructure.com> Tested-by: Jenkins Product-Review: Ryan Shaw <ryan@instructure.com> QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-14 11:57:26 +08:00
"webpack": "gulp rev & webpack --progress --color --watch",
"webpack-development": "gulp rev & webpack --progress --color",
"webpack-production": "NODE_ENV=production gulp rev && node --max_old_space_size=4096 $(yarn bin)/webpack --color --config webpack.production.config.js && yarn lint:browser-code",
"jspec": "./spec/jspec.sh",
"jspec-watch": "./spec/jspec.sh --watch",
"a11y-report": "./spec/jspec.sh --a11y",
"upgrade-and-dedupe": "rm -rf yarn.lock node_modules && yes 1 | yarn install --flat --production && git checkout package.json && yarn install && git add yarn.lock && git commit -m 'update npm deps'"
},
"resolutions": {
"jquery": "https://github.com/ryankshaw/jquery.git#a755a3e9c99d5a70d8ea570836f94ae1ba56046d",
"moment": "2.10.6"
AMD Conversion "Trivial" JavaScript / CoffeeScript changes -------------------------------------------------- For the most part, all javascript was simply wrapped in `require` or `define`. The dependencies were found with a script that matched regexes in the files, it errs on the side of listing too many dependencies, so its worth double checking each file's dependencies (over time, anyway). i18n API changes -------------------------------------------------- No longer have to do I18n.scoped calls, just list i18n as a dependency with the scope and it's imported already scoped require ['i18n!some_scope'], (I18n) -> I18n.t 'im_scoped', 'I'm scoped!' JS bundling now done with r.js, not Jammit -------------------------------------------------- We don't use jammit to bundle JS anymore. Simply list dependencies for your JS modules in the file and RequireJS handles the rest. To optimize the JavaScript, first make sure you have node.js 0.4.12+ installed and then run: $ rake js:build The app defaults to the optimized build in production. You can use non-optimized in production by putting ?debug_assets=true in the url just like before. You can also test the optimized JavaScript in development with ?optimized_js=true. Significant changes -------------------------------------------------- These files have "real" changes to them (unlike the JavaScript that is simply wrapped in require and define). Worth taking a really close look at: - app/helpers/application_helper.rb - app/views/layouts/application.html.erb - config/assets.yml - config/build.js - lib/handlebars/handlebars.rb - lib/i18n_extraction/js_extractor.rb - lib/tasks/canvas.rake - lib/tasks/i18n.rake - lib/tasks/js.rake Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7 Reviewed-on: https://gerrit.instructure.com/6986 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-11 00:31:45 +08:00
}
}