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
No related branches found
No related tags found
No related merge requests found
index.umd.js m3core.umd.js
mirador.min.js mirador.min.js
index.umd.js m3core.umd.js
dist/mirador.min.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 ...@@ -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: 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 `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. 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. 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`. 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 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Examples</title> <title>Examples</title>
<script src="../../../index.umd.js"></script> <script src="../../../dist/m3core.umd.js"></script>
</head> </head>
<body> <body>
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { actions } from '../../index'; import { actions } from '../store';
import Display from './Display'; import Display from './Display';
import ManifestForm from './ManifestForm'; import ManifestForm from './ManifestForm';
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { actions } from '../../index'; import { actions } from '../store';
class ManifestForm extends Component { class ManifestForm extends Component {
constructor(props) { constructor(props) {
......
...@@ -2,7 +2,7 @@ import React from 'react'; ...@@ -2,7 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import App from './components/App'; import App from './components/App';
import { store } from '../index'; import { store } from './store';
import './styles/index.scss'; import './styles/index.scss';
ReactDOM.render( ReactDOM.render(
......
...@@ -7,8 +7,8 @@ import thunkMiddleware from 'redux-thunk'; ...@@ -7,8 +7,8 @@ import thunkMiddleware from 'redux-thunk';
import { createLogger } from 'redux-logger'; import { createLogger } from 'redux-logger';
import { createStore, applyMiddleware } from 'redux'; import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension'; import { composeWithDevTools } from 'redux-devtools-extension';
import rootReducer from './src/reducers/index'; import rootReducer from './reducers/index';
import * as ActionCreators from './src/actions'; import * as ActionCreators from './actions';
const loggerMiddleware = createLogger(); const loggerMiddleware = createLogger();
// Create a Redux store holding the state of your app. // Create a Redux store holding the state of your app.
......
const path = require('path');
module.exports = [ module.exports = [
{ {
entry: './index.js', entry: './src/store.js',
output: { output: {
path: __dirname, path: path.join(__dirname, 'dist'),
filename: 'index.umd.js', filename: 'm3core.umd.js',
libraryTarget: 'umd', libraryTarget: 'umd',
library: 'm3core', library: 'm3core',
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment