diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 00000000..72a7189c --- /dev/null +++ b/app/assets/config/manifest.js @@ -0,0 +1,6 @@ +// JS and CSS bundles +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css + +// Other +//= link_tree ../images diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 8dcb1df3..13ad082d 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -16,6 +16,9 @@ //= require ./orderedLibraries/underscore //= require ./orderedLibraries/backbone //= require_directory ./lib +//= require_directory ./shims +//= require_directory ./require +//= require_directory ./famous //= require ./src/Metamaps.GlobalUI //= require ./src/Metamaps.Router //= require ./src/Metamaps.Backbone @@ -44,6 +47,3 @@ //= require ./src/Metamaps.Admin //= require ./src/Metamaps.Import //= require ./src/Metamaps.JIT -//= require_directory ./shims -//= require_directory ./require -//= require_directory ./famous diff --git a/app/assets/javascripts/src/Metamaps.Import.js b/app/assets/javascripts/src/Metamaps.Import.js index 159298b8..e82a05c5 100644 --- a/app/assets/javascripts/src/Metamaps.Import.js +++ b/app/assets/javascripts/src/Metamaps.Import.js @@ -320,5 +320,3 @@ Metamaps.Import = { Metamaps.Synapse.renderSynapse(mapping, synapse, node1, node2, true) } } - -module.exports = Metamaps.Import diff --git a/app/assets/javascripts/test/Metamaps.Import.spec.js b/app/assets/javascripts/test/Metamaps.Import.spec.js index d8993e42..cf8d6f53 100644 --- a/app/assets/javascripts/test/Metamaps.Import.spec.js +++ b/app/assets/javascripts/test/Metamaps.Import.spec.js @@ -1,11 +1,12 @@ -var chai = require('chai') -var expect = chai.expect +/* global describe, it */ +const chai = require('chai') +const expect = chai.expect -Metamaps = {} -Metamaps.Import = require('../src/Metamaps.Import') +const Metamaps = {} +require('../src/Metamaps.Import') -describe('Metamaps.Import.js', function() { - it('has a topic whitelist', function() { +describe('Metamaps.Import.js', function () { + it('has a topic whitelist', function () { expect(Metamaps.Import.topicWhitelist).to.deep.equal( ['id', 'name', 'metacode', 'x', 'y', 'description', 'link', 'permission'] )