Commit Graph

39 Commits

Author SHA1 Message Date
Jon Jensen c83c1ee93c spec: fix js tests under webpack
wheee regexes

spec/javascripts/jsx/speed_grader/mgpSpec.jsx was breaking :allthethings:
cuz 1. require and 2. multiline. now we allow those, cuz why not

test plan:
1. js specs should still pass under requirejs
2. js specs should now pass under webpack

Change-Id: I039991bcb8fd5afd25ffa1ede487bd3691848761
Reviewed-on: https://gerrit.instructure.com/91196
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-09-23 21:09:58 +00:00
Ryan Shaw 76d19b0c60 in webpack: provide a fallback so require(['jquery'] works
closes: CNVS-31940

This is to try to not break code of our customers
that use RequireJS-style `require`s in their Custom
JS files from ThemeEditor. It is not meant to be
comprehensive. There will be some customers that
need to change their code, but there was a lot that
just used require to load jquery or just load an
external script. this should handle both of those cases.

test plan:
* with webpack turned on, type this into the console:
  require([
    'underscore',
    'jquery',
    'https://code.jquery.com/color/jquery.color.js'
  ], function(_, $) {
    console.log('got', $, _, $.Color.names)
  })
* it should log underscore, jquery and the colors

Change-Id: I88ad111ac6c475c9bb0987ed98bec10417a6eea0
Reviewed-on: https://gerrit.instructure.com/90379
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-09-20 17:15:30 +00:00
Ryan Shaw 79c21bb263 set NODE_ENV in webpack build
test plan:
* before checking this out, run:
  NODE_ENV=production npm run webpack-production
* check the size of the common bundle with:
  ls -lah public/webpack-dist-optimized/instructure-common.bundle.js 
* check this out and run it again
* the size of that file should now be smaller


Change-Id: Ice764700e75c2a793b2807b6a77e30fa7b2f2c25
Reviewed-on: https://gerrit.instructure.com/90432
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2016-09-19 16:59:28 +00:00
Ryan Shaw f02b43f574 upgrade to node 6
closes: CNVS-29725

this gets everything working on node 6.

As far as our build process goes, it cannot support
running on both node 6 at the same time as 0.12
since our i18nliner handlebars stuff uses jsdom and
one version of it only works on node <4 and the
next only works on 4+.

But the stuff in the production dependencies in
package.json, aka the stuff that runs on the job
servers (brandable_css), can work on both. we just
need to run npm rebuild on the job servers if the stuff
that was npm installed into ./node_modules was compiled
against a different version of node. that is done here:
https://gerrit.instructure.com/81254
that commit needs to be committed to caturday before
we commit and deploy this to beta

as far as managing node, there are 2 "official"
ways that will make you life easier, you can either
just use docker or use nvm (https://github.com/creationix/nvm)

if you use nvm and if you use ZSH:
Put this into your $HOME/.zshrc to call nvm use automatically
whenever you enter a directory that contains an
.nvmrc file with a string telling nvm which node to use:

  # place this after nvm initialization!
  autoload -U add-zsh-hook
  load-nvmrc() {
    if [[ -f .nvmrc && -r .nvmrc ]]; then
      nvm use
    elif [[ $(nvm version) != $(nvm version default)  ]]; then
      echo "Reverting to nvm default version"
      nvm use default
    fi
  }
  add-zsh-hook chpwd load-nvmrc
  load-nvmrc

but however you do it, as long as you have node 6.2
installed it should work

test plan:
* install nvm
* check this patchset out
* run bundle exec rake canvas:compile_assets
* it should work
* use theme editor to preview a change to a theme
* it should work

Change-Id: I1cc9faed361938afc713c4b921042386b956db70
Reviewed-on: https://gerrit.instructure.com/80839
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-08-09 23:37:07 +00:00
Ryan Shaw 2121cf7430 move "old_unsupported_react" to client_apps
closes: CNVS-30472

since client_apps/canvas_quizzes is the only
thing that cares about our old version of
react and react-router, this moves them out
of canvas and into canvas_quizzes so it is the
only one that can use them. This simplifies
things in canvas so no one ever tries to
use them going forward.

test plan:

* inside of client_apps/canvas_quzzes
  run: `script/build && grunt test`
* it should pass jenkins
* click around in the quiz stats and quiz log
auditing apps to make sure they still load

mv old_unsupported

Change-Id: I56eadedfe2417f32f2afb99ec76a21870871ad7e

WIP move "old_unsupported_react" to client_apps

Change-Id: I673321b51db9b197a298ccb831c417e902aaae28
Reviewed-on: https://gerrit.instructure.com/85483
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-08-05 19:26:33 +00:00
Clay Diffrient c08c79e127 Fix the webpack build for quiz statistics
This keeps quiz_statistics using the underscore compatible
version of lodash 2.4.1 in which exists _.findWhere rather than
using the new 4.x version of lodash recently added.

closes CNVS-30750

Test Plan:
  - Post-merge and silent patchset builds for selenium webpack pass

Change-Id: I4f63aa431e29b77dd46dad4a9828afe10e84ef85
Reviewed-on: https://gerrit.instructure.com/86007
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-08-03 22:28:29 +00:00
Clay Diffrient 77a8e49891 Add special case for some plugin specs to webpack
For some reason some plugins like analytics have specs that
live in `spec_canvas/coffeescripts` it seems that webpack never
properly picked those up and complained about it in warnings.

Test Plan:
  - Webpack tests pass

Change-Id: I1c84f6850aa0501a5659aabde7768257e97a9253
Reviewed-on: https://gerrit.instructure.com/78723
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-07-06 22:04:01 +00:00
Clay Diffrient c093331852 fix webpack trying to bundle license_help file
This fixes it post 4f547f345b

Test Plan:
  - Webpack builds without complaining about it

Change-Id: Ie6d58a3d9ac4b1c9ee4b8a1075c57321c630a3c7
Reviewed-on: https://gerrit.instructure.com/82473
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2016-06-14 16:37:06 +00:00
John Corrigan 17d44b8a03 require scoped_hbs_pre_processor in i18nLinerHandlebars.js
fixes CNVS-28474

From what I could tell, none of the hbs templates were being passed the
`scope` value as part of the helper method `options.hash`, and that's
because we were not using the preprocesses that
PreProcessor.processStatement override via
frontend_build/i18nLinerHandelbars.js.

test plan:
- Load canvas using the Webpack build.
- Go into Calendar.
- Click on a day in the month and a Edit Event modal should pop up.
- Observe that the `Date:` labem is present, whereas it used to say
  [object Object].

Change-Id: I8e077261379b43f5be27ab6544d9d05a47e97625
Reviewed-on: https://gerrit.instructure.com/81558
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-06-09 22:11:20 +00:00
Matthew Sessions ab0dee7a30 UI to show the list of a users collaborations
Fixes PLAT-1564

Test Plan
 - With the new collaboration feature flag turned on
 - For a user, create some collaborations with the
   collaboration_type=external_tool_collaboration
 - Load the lti_collaborations page
 - Notice that collaboration now shows

Change-Id: Ie17a599fa4b54a98eff7060c2c72b2c76c242b3d
Reviewed-on: https://gerrit.instructure.com/81645
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
2016-06-07 21:25:25 +00:00
Ethan Vizitei be337eeb01 webpack: dont rely on translation files in development
Change-Id: I12bf4332bf9ec57a509d08bf71073033756b17bf
Reviewed-on: https://gerrit.instructure.com/72366
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-05-27 22:52:41 +00:00
Clay Diffrient 4655dc941d Loosen up regex for detecting amd callback
Previous to this change if the callback only contained
'$' or '_' as variables to hold the required dependency,
it was not detected and qunit was not injected properly

fixes CNVS-29207

Test Plan:
  - Automated tests pass that contain only $
  - Normal automated tests pass

Change-Id: I22d9cb390bfc1f0b579577dc7bec2de40fd5dc3f
Reviewed-on: https://gerrit.instructure.com/79017
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-05-09 16:25:27 +00:00
Ethan Vizitei 513cadec68 remove react-router from webpack vendor bundle
fixes CNVS-29021

TEST PLAN: webpack should build

Change-Id: I5db995adfbeb876df681e310714e5b65a40af96f
Reviewed-on: https://gerrit.instructure.com/78237
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-04-28 21:17:32 +00:00
Ryan Shaw 80a7fb0941 remove "Tour" functionality. nothing used it.
closes: CNVS-28669
refs: CNVS-28781

Back in 2013 we came up with an awesome idea to have these
"Tours" to introduce new features and stuff. It was a
great idea but we don't use it anymore. it has been commented
out so it doesn't show up in the styleguide and all but one
(see below) were commented out of config/tours.rb.
so in the interest of not letting code hang around
that we don't use, I'm removing it (unless anyone is opposed
or has a good reason to leave it). If we want to do it in the
future, we can just add it back, because yay Git!

There was one place in quizzes that was still trying to
use a tour. if you go to create a quiz and edit a question
and then pick another option as the correct answer for a
multiple choice question it would try to show a tour telling
you that you could regrade all the existing submissions. but
in reality it just threw a javascript error and the tour never
popped up. So even though it was still in the code, it didn't
work. Since no one noticed that it stopped working, I'm assuming
we don't need it any more. Quizzes team and quizzes
product/QA, will you confirm this is ok?

test plan:
* no tours should show up anywhere in canvas
* read that paragraph above about the "regrade existing"
  thing in quizzes.
* try that feature, it should work but no tour should show up
  and no error should occur in the console

Change-Id: Ib2d6bbb80f93fd7ca0a33d20c1f57ee16e7027ea
Reviewed-on: https://gerrit.instructure.com/76875
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-04-21 18:25:05 +00:00
Ryan Shaw c3386397ef cleaner way to lookup brandable_css fingerprints for webpack
refs: CNVS-27874

TEST PLAN:
 1) run webpack build
 2) should be fast
 3) load the calendar page
 4) all the styles should look good

Change-Id: I28d9205fbf53616ed9264d8393dc617962e43c22
Reviewed-on: https://gerrit.instructure.com/74197
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-04-06 17:03:44 +00:00
Clay Diffrient 96674ee369 Remove firebugx from webpack build
This follows up to f725bcf813
by also removing it from the webpack build.

Test Plan:
  - The webpack build works still

Change-Id: I43aa82c129aa9dbf5bf4d4e4928f39701af147a8
Reviewed-on: https://gerrit.instructure.com/75887
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2016-03-31 18:24:59 +00:00
Ryan Shaw b81b78b325 remove strange jquery_ui_menu bundle
it was just a bundle that required another bundle

the only place we used this calendar2.
this just removes the step of indirection and
simplifies things so we don't have to do extra work
to workaround it in webpack

refs: CNVS-27679

test plan:
in prod env, go to calendar2
do some things that cause modals to open
it should work
do the same with webpack on

Change-Id: I23fc7836e1def8283d582df98f895cdc6d8f1317
Reviewed-on: https://gerrit.instructure.com/73242
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-03-28 22:46:06 +00:00
Clay Diffrient e659ffd70f add start and async test to the replacements for qunitjsxloader
This makes it so using async test features of qUnit works within
the JSX specs.

Change-Id: I602468d7ef70091e603f02bc9558390b94c0bfee
Reviewed-on: https://gerrit.instructure.com/74527
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-03-15 18:18:04 +00:00
Clay Diffrient e1a19ff487 Fix qunit jsx dependency loader regex
This makes it so that multi-line define statements work with
the qunit dep loader for jsx.

Prior to this commit
```
  define([
    'jsx/account_course_user_search/reducers/rootReducer'
  ], (reducer) => {
```

is not properly transformed, however

```
define(['jsx/account_course_user_search/reducers/rootReducer'], (reducer) => {
```

does get transformed properly.

Effectively, this replaces the `.` regex operator which doesn't transend
newlines with `[\s\S]` which effectively does the same thing
including newlines as well though.

Change-Id: Ife96438695997050fbdf866b7c319fa1b075875a
Reviewed-on: https://gerrit.instructure.com/74419
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-03-14 18:39:12 +00:00
Ryan Shaw ad34b40c32 make it so you can use es6 in the webpack config stuff
refs: CNVS-27679

if you name your config files *.config.babel.js
webpack knows to run them through babel. this change
makes it so use es6 stuff in the webpack.config files
(including everything in /frontend_build)

test plan:
run webpack
it should work

Change-Id: I6ceda3386227c30e106339f744f18dc61bbab54b
Reviewed-on: https://gerrit.instructure.com/73241
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-03-11 21:18:43 +00:00
Ethan Vizitei 16c6c1c172 webpack: Help handlebars compilation not be terri-slow.
closes CNVS-27874

TEST PLAN:
 1) run webpack build
 2) should be fast

Change-Id: I3d0b07cb7417cbd235bd628375d9888c6cc8d090
Reviewed-on: https://gerrit.instructure.com/74112
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-03-09 18:56:39 +00:00
Ethan Vizitei d32465ecd5 make web pack specs pick up jsx specs
closes CNVS-27835

TEST PLAN:
  1) aux builds should pass

Change-Id: I882c89fba1240037bbda11f321a5afd85e854ced
Reviewed-on: https://gerrit.instructure.com/73971
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-08 19:08:14 +00:00
Ethan Vizitei 35c84fc95f webpack: use handlebars source
closes CNVS-27767

it’s the same reason as jsx was added here.
we compile handlebars templates to public/jst/etc
which matches to the same require path
so if you require “jst/wiki/WikiPageEdit”, it will grab the requirejs
pre-compiled version rather than the handlebars source
so watch doesn’t pickup changes to the handlebar template

TEST PLAN:
 1) build with webpack
 2) make a handlebars change
 3) webpack picks it up

Change-Id: I57e89652a43d3046a71b5779ffff883907da2b14
Reviewed-on: https://gerrit.instructure.com/73794
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-08 17:02:56 +00:00
Ethan Vizitei 9be656a7f7 add ENV var to skip js rev'ing in dev if you want
Change-Id: I7eb1413191d9b0ca0178459b96430c796334d11b
Reviewed-on: https://gerrit.instructure.com/72376
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-02 00:06:29 +00:00
Ethan Vizitei 2329d50839 stop webpack from loading js-from-jsx
the artifacts generated by the requirejs build can
be picked up by webpack, we need to make sure that
doesn't happen to allow webpack to find changes as you work.

Change-Id: I8df9ca16105eb8f179b82111ebc516de0410226d
Reviewed-on: https://gerrit.instructure.com/72121
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-12 18:18:31 +00:00
Clay Diffrient 7f6d18f574 Remove unused redux-promise library
Change-Id: If8e348fbbe880034a871c35156a050f2ff486c19
Reviewed-on: https://gerrit.instructure.com/71973
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-02-11 21:40:04 +00:00
Clay Diffrient b9119afe32 Remove react-bootstrap-table from webpack noParse
This allows the library package to be parsed correctly
handling uses of require

Change-Id: I17ee5eb2d8b7f083371388b316d311caebb712c3
Reviewed-on: https://gerrit.instructure.com/71975
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-02-11 15:49:15 +00:00
Ethan Vizitei da9a226eb4 make webpack able to digest jsx from plugins
Also don't parse the react bootstrap table plugin, it's already
a prebuilt thing that doesn't require other things.

Change-Id: Ibdc06483afc22fe53d08a50892ac2d1322d759e2
Reviewed-on: https://gerrit.instructure.com/71646
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-06 23:37:44 +00:00
Ethan Vizitei f58d5b5023 shim in web pack version of timezone plugin
refs CNVS-25916

Replicate old require-js plugin behavior
for making sure contextual timezone and locale
information is loaded before any other modules
depend upon it.

TEST PLAN:
  1) grading_periods_account_spec should pass in
     webpack selenium build

Change-Id: I46871b15e803e551149d344922f1679906873c54
Reviewed-on: https://gerrit.instructure.com/70553
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-19 21:48:07 +00:00
Ethan Vizitei 51baba3eeb move content_migration work into support bundle
refs CNVS-25916

the migration_tool plugin uses the secondary
bundle override technique of having an extension
bundle loaded in parallel.  I don't think we
want to support both that and the glue-module
extension approach since only one plugin makes
use of the former.  In order to migrate that
work to extend a core module, the work
needs to be moved to a non-entry-point
module (because overriding require names doesn't
work if you're talking about the bundles
rails knows how to load). All this patchset does
is move the core work done in the content_migration
bundle into it's own module to make a valid
override target for the plugin refactor.

Also adds this new module as a non-entry-point
exception in the bundles.js, just like it's sibling
file.

TEST PLAN:
 1) nothing should change on /courses/x/content_migrations

Change-Id: I2dfa0d1b1d11657bb5931e8caae6ef9d4b3c9aec
Reviewed-on: https://gerrit.instructure.com/70510
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-19 18:25:12 +00:00
Ethan Vizitei 4f797398d9 fix quizzes/quizzes_stats_spec.rb in selenium
refs CNVS-25916

the "app" directory as root is only present for docker users.
we can just remove it from the matchers for jsx loaders
and then these work on jenkins too.

TEST PLAN:
 1) spec/selenium/quizzes/quizzes_stats_spec should pass in selenium
    webpack build

Change-Id: I51f915452de5f4a3f98407d6e3b90a4b18a8671e
Reviewed-on: https://gerrit.instructure.com/70292
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 20:35:44 +00:00
Ethan Vizitei aa477b031c Fix webpack selenium specs for course/account searches
refs CNVS-25916

alias case-sensitive file names so they build
the same on Linux as OS-X

Change-Id: Ib36193d7f7a6c3f77e4eac6e5650ea549747b957
Reviewed-on: https://gerrit.instructure.com/70203
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 00:34:06 +00:00
Ethan Vizitei b271b5d694 build quiz log auditing w/ web pack
refs CNVS-25916

Use an AMD-rewritten version of old react-router
and expose some of reacts internals that
react-router depends on (named AMD across files
is something web pack does not support), and leave
the other version for the require-js build for now.

Also, add gulp rev as a web pack post build action.

TEST PLAN:
  1) regression check QLA and Quiz Stats
     to make sure reworking their dependencies didn't
     crash everything

Change-Id: Id2b448a334494ebd3d353678742bf07c1b7833eb
Reviewed-on: https://gerrit.instructure.com/69837
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 00:33:38 +00:00
Ethan Vizitei 81561784e0 web pack port of quiz statistics
refs CNVS-25916

remove dynamic requirements for env configs,
use separate jsx loader for client apps,
update client app plugin to use old react version,
rewrite selenium spec to be an integration test
rather than executing arbitrary javascript,
and MAJORLY refactor loading patterns of client apps
to avoid sharing code with differences delineated
by opaque require re-writes.

Also moved some code that was in "common" client
app but only used by one actual client app down
into the app that uses it (simplifies dependency
tracing).

TEST PLAN:
 1) make sure quiz statistics still works ok under
    require js build, no behavior should have changed
 2) also make sure quiz log auding works under require-js

Change-Id: I0e5ee3eda9da16e0ad48cf858761735c71df801c
Reviewed-on: https://gerrit.instructure.com/69804
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 00:33:19 +00:00
Ethan Vizitei e94267df29 fix client_app reference in web pack build
refs CNVS-25916

This prevented non-docker installs from web packing
correctly, unless they happened to be inside
a directory called "app".

TEST PLAN:
 1) nothing should change, no production code impact

Change-Id: Ice89ed1295e0502bc9d6cc432767f371a1a53b83
Reviewed-on: https://gerrit.instructure.com/70016
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-12 17:39:26 +00:00
Ethan Vizitei f6b4b6e0e1 glob for web pack bundles
refs CNVS-25916

newly added bundles are being missed.
Look for bundles in "app/coffeescripts/bundles"
and reject those which are not entry points.

TEST PLAN:
  1) specs should pass
  2) web pack selenium build should have less failures

Change-Id: I7562e4f6124a78b62cdd59151067ce31ac65e164
Reviewed-on: https://gerrit.instructure.com/69311
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-22 15:47:36 +00:00
Ethan Vizitei 765507f63e several things to help webpack compile speed
closes CNVS-25714

TEST PLAN:
web pack should compile in like 60 seconds rather than 600

Change-Id: I74716d9cccfd0253693660c0b4ad4368e91b72e7
Reviewed-on: https://gerrit.instructure.com/68497
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-12-09 19:25:30 +00:00
Simon Williams a1e7f57c56 webpack tests
closes CNVS-24966

change js specs to work with web pack.
update some dependency references, make some aliases
for external dependencies to get the right version,
and clean up a bunch of leaky state.

TEST PLAN:
js tests should pass in web pack _and_ requires

Change-Id: If37fbce93e7e67021d90bacb470ffc4f1b17402d
Reviewed-on: https://gerrit.instructure.com/66309
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-24 18:40:58 +00:00
Ethan Vizitei d7f61d1820 use web pack
closes CNVS-24124

makes working with web pack possible in canvas
instead of require-js.  See doc/working_with_webpack.md
for instructions.

TEST PLAN:
Nothing should change in non-webpack'd behavior
Things should mostly work when you use the
USE_WEBPACK environment variable, but make sure to document
and ticket things that don't

Change-Id: I493a259a609e9e183950bc57aa5876df70108547
Reviewed-on: https://gerrit.instructure.com/64386
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-02 16:27:14 +00:00