Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Update frontend libs #497

Merged
merged 7 commits into from
Aug 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion regulations/management/commands/compile_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def remove_dirs(self):
os.mkdir(self.BUILD_DIR)

def create_configs(self):
for config_file in ('Gruntfile.js', 'package.json', '.babelrc'):
for config_file in ('Gruntfile.js', 'package.json', '.babelrc',
'npm-shrinkwrap.json'):
os.rename(os.path.join(self.BUILD_DIR, 'static', 'config',
config_file),
os.path.join(self.BUILD_DIR, config_file))
Expand Down
256 changes: 256 additions & 0 deletions regulations/static/config/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions regulations/static/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"chai": "^3.5.0",
"coveralls": "^2.11.2",
"deamdify": "^0.1.1",
"dom-storage": "^2.0.2",
"eslint": "^3.12.2",
"eslint-config-airbnb": "^13.0.0",
"eslint-plugin-import": "^2.2.0",
Expand All @@ -60,7 +61,6 @@
"minifyify": "^7.2.1",
"mocha": "^3.2.0",
"mocha-jsdom": "^1.1.0",
"node-localstorage": "^1.3.0",
"sinon": "^1.17.3",
"sinon-chai": "^2.8.0",
"watch": "^0.17.1"
Expand All @@ -75,23 +75,23 @@
}
},
"dependencies": {
"backbone": "1.2.3",
"backbone": "^1.3.3",
"backbone-query-parameters": "0.4.0",
"backbone.localstorage": "1.1.16",
"clipboard": "1.5.5",
"datatables.net": "1.10.10",
"filesize": "3.2.1",
"jquery": "1.12.2",
"jquery-lazyload": "1.9.7",
"jquery-scrollstop": "1.2.0",
"backbone.localstorage": "^2.0.0",
"clipboard": "^1.7.1",
"datatables.net": "^1.10.15",
"filesize": "^3.5.10",
"jquery": "^1.12.4",
"jquery-lazyload": "^1.9.7",
"jquery-scrollstop": "^1.2.0",
"prosemirror": "0.4.0",
"query-command-supported": "1.0.0",
"query-command-supported": "^1.0.0",
"react": "^15.4.1",
"react-dom": "^15.4.1",
"redux": "^3.6.0",
"respond.js": "1.4.2",
"underscore": "1.8.3",
"urijs": "1.17.1"
"respond.js": "^1.4.2",
"underscore": "^1.8.3",
"urijs": "^1.18.10"
},
"config": {
"travis-cov": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

const _ = require('underscore');
const Backbone = require('backbone');
Backbone.LocalStorage = require('backbone.localstorage');
const localStorage = require('backbone.localstorage');
Backbone.LocalStorage = localStorage.LocalStorage;

const commentModel = require('../models/comment-model');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
var chai = require('chai');
var expect = chai.expect;
var jsdom = require('mocha-jsdom');
var localStorage = require('node-localstorage');

var storage = new localStorage.LocalStorage('.');
var Storage = require('dom-storage');

describe('CommentConfirmView', function() {
jsdom();
Expand All @@ -15,7 +13,7 @@ describe('CommentConfirmView', function() {
Backbone = require('backbone');
$ = require('jquery');
Backbone.$ = $;
global.localStorage = window.localStorage = storage;
global.localStorage = window.localStorage = new Storage();
comments = require('../../../source/collections/comment-collection');
CommentModel = require('../../../source/models/comment-model').CommentModel;
CommentConfirmView = require('../../../source/views/comment/comment-confirm-view');
Expand All @@ -37,6 +35,7 @@ describe('CommentConfirmView', function() {
comments.models.forEach(function(comment) {
comment.destroy();
});
window.localStorage.clear();
});

it('clears comments when metadata is defined', function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ var chai = require('chai');
var expect = chai.expect;
var sinon = require('sinon');
var jsdom = require('mocha-jsdom');
var localStorage = require('node-localstorage');
var Storage = require('dom-storage');
var _ = require('underscore');

var storage = new localStorage.LocalStorage('.');

describe('CommentView', function() {
jsdom();

Expand All @@ -18,7 +16,7 @@ describe('CommentView', function() {
$ = require('jquery');
Backbone.$ = $;
edit = require('prosemirror/dist/edit');
global.localStorage = window.localStorage = storage;
global.localStorage = window.localStorage = new Storage();
comments = require('../../../source/collections/comment-collection');
CommentEvents = require('../../../source/events/comment-events');
CommentView = require('../../../source/views/comment/comment-view');
Expand Down Expand Up @@ -60,6 +58,7 @@ describe('CommentView', function() {
edit.ProseMirror.prototype.getContent.restore();
edit.ProseMirror.prototype.setContent.restore();
edit.ProseMirror.prototype.ensureOperation.restore();
window.localStorage.clear();
});

it('removes an attachment', function() {
Expand Down
Loading