Skip to content
Snippets Groups Projects
Commit 9671aff5 authored by Jack Reed's avatar Jack Reed
Browse files

move index.umd.js -> m3core.umd.js

parent 607c6ea8
Branches
Tags
No related merge requests found
index.umd.js
m3core.umd.js
mirador.min.js
index.umd.js
m3core.umd.js
dist/mirador.min.js
......@@ -4,7 +4,7 @@ This module is intended to be a console-only version of the a Mirador-like viewe
To run the module, first make sure you are in this directory (`minimal_redux_poc`), then:
1. Run `npm install` to install the dependencies.
1. Run the `npm run build:umd` task. This will produce an "isomorphic" webpack bundle of the module that can run in the console or browser. The bundle will be called `index.umd.js` and is placed in this same directory.
1. Run the `npm run build:umd` task. This will produce an "isomorphic" webpack bundle of the module that can run in the console or browser. The bundle will be called `m3core.umd.js` and is placed in the `dist` directory.
1. Open a nodejs console (type `node`) in this directory.
1. Import variable names from the module, for example, `let { store, actions } = require('./index.umd')`.
1. The exported module currently has most of its functionality under the "store" property, so you may prefer to include it with `let state = require('./index.umd').store`.
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>Examples</title>
<script src="../../../index.umd.js"></script>
<script src="../../../dist/m3core.umd.js"></script>
</head>
<body>
......
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { actions } from '../../index';
import { actions } from '../store';
import Display from './Display';
import ManifestForm from './ManifestForm';
......
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { actions } from '../../index';
import { actions } from '../store';
class ManifestForm extends Component {
constructor(props) {
......
......@@ -2,7 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import App from './components/App';
import { store } from '../index';
import { store } from './store';
import './styles/index.scss';
ReactDOM.render(
......
......@@ -7,8 +7,8 @@ import thunkMiddleware from 'redux-thunk';
import { createLogger } from 'redux-logger';
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
import rootReducer from './src/reducers/index';
import * as ActionCreators from './src/actions';
import rootReducer from './reducers/index';
import * as ActionCreators from './actions';
const loggerMiddleware = createLogger();
// Create a Redux store holding the state of your app.
......
const path = require('path');
module.exports = [
{
entry: './index.js',
entry: './src/store.js',
output: {
path: __dirname,
filename: 'index.umd.js',
path: path.join(__dirname, 'dist'),
filename: 'm3core.umd.js',
libraryTarget: 'umd',
library: 'm3core',
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment