diff --git a/__tests__/integration/vanilla-js.test.js b/__tests__/integration/vanilla-js.test.js deleted file mode 100644 index acc6b5a00dde57490f8e31b87eb39eec6c4c08f4..0000000000000000000000000000000000000000 --- a/__tests__/integration/vanilla-js.test.js +++ /dev/null @@ -1,17 +0,0 @@ -describe('Plain JavaScript example', () => { - beforeAll(async () => { - await page.goto('http://127.0.0.1:4488/__tests__/integration/vanilla-js/'); - }); - it('has the correct page title', async () => { - const title = await page.title(); - expect(title).toBe('Examples'); - }); - it('loads a manifest and displays it', async () => { - await expect(page).toFill('#manifestURL', 'http://localhost:5000/api/sn904cj3429'); - await expect(page).toClick('#fetchBtn'); - // TODO: Refactor the app so we get rid of the wait - await page.waitFor(1000); - const manifest = await page.$eval('#exampleManifest', e => e.innerHTML); - await expect(manifest).toMatch(/http:\/\/iiif\.io\/api\/presentation\/2\/context\.json/); - }); -}); diff --git a/__tests__/integration/vanilla-js/README.md b/__tests__/integration/vanilla-js/README.md deleted file mode 100644 index abe90a01e6af8c2423709eabc5bbdbc9c349897b..0000000000000000000000000000000000000000 --- a/__tests__/integration/vanilla-js/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Notes -To load external manifests, you will need to run the example pages from a serve. One easy way to do this is to run PythonHTTPServer: -`python -m SimpleHTTPServer` - -To inspect the Mirador 3 prototype in the web console with (code completion), you can refer to it as: -`m3core` - -This name is found in the `minimal_redux_poc/webpack.config.js` as the value of the `library` property. diff --git a/__tests__/integration/vanilla-js/index.html b/__tests__/integration/vanilla-js/index.html deleted file mode 100644 index 5c0485d46fb67960cd4e2a80e14d72668591aa8c..0000000000000000000000000000000000000000 --- a/__tests__/integration/vanilla-js/index.html +++ /dev/null @@ -1,44 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="UTF-8"> - <title>Examples</title> - <script src="../../../dist/m3core.umd.js"></script> - </head> - <body> - - <input id="manifestURL" type="text"/><button id="fetchBtn" type="submit">Fetch Manifest</button> - <pre id="exampleManifest"> - - </pre> - - <script> - document.getElementById("fetchBtn").addEventListener("click", function(){ - let val = document.getElementById("manifestURL").value; - let f = m3core.actions.fetchManifest(val); - m3core.store.dispatch(f); - }); - - m3core.store.subscribe(() => { - let contents = '' - let state = m3core.store.getState(); - let manifest = state.manifests[document.getElementById("manifestURL").value]; - switch (manifest.isFetching) { - case true: - contents = 'spinner'; - break; - case false: - if(manifest.error){ - contents = manifest.error.message; - } else { - contents = JSON.stringify(manifest.json, 0, 3); - } - break; - default: contents = '' - } - document.getElementById("exampleManifest").innerHTML = contents; - }); - - </script> - </body> -</html> diff --git a/src/index-core.js b/src/index-core.js deleted file mode 100644 index dbba0b7371cc16f9d187385e440f745058eea43b..0000000000000000000000000000000000000000 --- a/src/index-core.js +++ /dev/null @@ -1,5 +0,0 @@ -import createStore from './state/createStore'; -import * as actions from './state/actions'; - -const store = createStore(); -export { store, actions }; diff --git a/webpack.config.js b/webpack.config.js index 760b6b39dc96b7c42c238c13ec4146c0ad479676..ab2b564b44b81ffbefd68c611ecf937997014ebc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,20 +15,6 @@ const babelLoaderConfig = { test: /\.(js|mjs|jsx)$/, }; const baseConfig = [ - { - entry: './src/index-core.js', - module: { - rules: [ - babelLoaderConfig, - ], - }, - output: { - filename: 'm3core.umd.js', - library: 'm3core', - libraryTarget: 'umd', - path: path.join(__dirname, 'dist'), - }, - }, { entry: ['./src/polyfills.js', './src/index.js'], module: {