2019-06-12 14:54:18 +01:00
|
|
|
const path = require('path');
|
2022-02-22 07:22:23 -06:00
|
|
|
const webpack = require('webpack');
|
2019-10-16 06:31:35 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Production library config.
|
|
|
|
|
*
|
|
|
|
|
* Used as a base, this produces with other configs:
|
|
|
|
|
*
|
|
|
|
|
* - `dist/spectacle.min.js`: production library
|
|
|
|
|
* - `dist/spectacle.js`: development library
|
|
|
|
|
*/
|
2019-06-12 14:54:18 +01:00
|
|
|
|
|
|
|
|
module.exports = {
|
2019-10-16 06:31:35 -07:00
|
|
|
mode: 'production',
|
2022-02-22 07:22:23 -06:00
|
|
|
entry: './src/index.ts',
|
2019-06-12 14:54:18 +01:00
|
|
|
output: {
|
2019-10-16 06:31:35 -07:00
|
|
|
library: 'Spectacle',
|
|
|
|
|
libraryTarget: 'umd',
|
2019-06-12 14:54:18 +01:00
|
|
|
path: path.join(__dirname, 'dist'),
|
2019-10-16 06:31:35 -07:00
|
|
|
filename: 'spectacle.min.js'
|
|
|
|
|
},
|
|
|
|
|
devtool: 'source-map',
|
|
|
|
|
externals: {
|
|
|
|
|
react: 'React',
|
Merge v7 Spectacle into main (#980)
* Adds business logic hooks and util functions (#930)
* Add util functions
* Added more hooks and numeric functions
* Remove double import
* Updated using mergeAnything
* Integrate Deck and Slide components into existing codebase (#932)
* Started integration work on deck and slide for v7
* Continued work on integration
* Finished initial pass of integrating deck and slide.
* Added Slide Fragments Example.
* Remove local image from example
* v7: Integrate Markdown, Markdown Slide Set, and new Code Pane (#934)
* Started integration work on deck and slide for v7
* Continued work on integration
* Finished initial pass of integrating deck and slide.
* Remove local image from example
* Added more work for MD support
* Working on code slide
* Use Theme Sizing for CodePane.
* Finished Code Pane theming
* Fix imports for Markdown, MarkdownSlideSet
* Updated exports and moved hoisted function.
* Update one-page and rebuild with new js example. Add back control comments. Fix react-dom externals declaration.
* Revert version number
Co-authored-by: Ryan Roemer <ryan.roemer@formidable.com>
* Add base Presenter View to Spectacle v7 (#940)
* Add base Presenter View with Notes support.
* Finished navigation and UI for presenter view.
* Use Broadcast Channel for Dual-Browser message bus for presenting. (#942)
* Use Broadcast Channel for Dual-Browser message bus for presenting.
* Remove debug console statement.
* Feature/templates progress v7 (#946)
* Added template support, fixed Progress component.
* Fix tests for Progress and new Deck Context
* Fix examples Notes import; update one-page
Co-authored-by: Ryan Roemer <ryan.roemer@formidable.com>
* Update ESLint Configuration; Delete Older Files (#947)
* Fix lint issues, delete old files.
* Fix curried component in docs.
* Updated Overview Mode (#950)
* Add base Overview mode.
* Got initial pass of Overview Deck working
* Updated for better Overview mode
* Fix scaling on overview slide.
* Fix Overview Style for Portal.
* Updated styles for focus.
* Fix line endings to LF
* Fix card sizing in overview mode. Added Broadcast Channel polyfill.
* Fix imports!
* Update one-page
Co-authored-by: Ryan Roemer <ryan.roemer@formidable.com>
* Support presenter and overview mode query params inside the url. (#955)
* also update main-7 - fix analgous to analogous, precents to percents (#957)
* Bump version number for Babel to build on Windows (#962)
* Changes for version 7.0.0-beta.1
* 7.0.0-beta.1
* Pass current slide and total count to template. (#963)
* V7: Overview Mode | Update the slideIndex value in url after a user presses tab to select a slide (#961)
* add tab and shift+tab events to useMouseTrap hook in overview mode
add tabindex = 0 only on current slide
outline current slide when switching to overview mode
* add payload option to regressSlide() action to reset the stepIndex back to 0 when regressing slides in overview mode
* overview mode - allow user to press enter to select a slide and exit overview mode, or click to select a slide and exit overview mode
* alphabetically order dependencies for handleSlideClick callback
* fix hover style appearing in default mode
* rename isOverviewMode to inOverviewMode for clarity
* refactor default-deck to contain toggleMode and keyboard shortcuts instead of in deck.js
* refactor default-deck to have usemousetrap and onslidelick below prevously created functions
* use data-in-overview-mode as a prop to prevent React Warning: inOverviewMode prop on DOM Element
* rename data attribute to data-overview-mode to remove redundant words
* add hover state to control onMouseEnter and onMouseLeave props
* v7: Code Pane | Allow single array range in highlightRanges prop (#959)
* allow single array, 2D containing numbers and single digit ranges
* rename isRangeOneLineNumber to a more clear constant isOneLineNumber
* refactor checkIfSingleArrayInHighlightRanges to remove redundant conditions
* remove redundant function - checkIfSingleArrayInHighlightRanges and refactor numberOfSteps
* refactor to prevent error if a user passes in [null, null] or any null/undefined value in highlightRanges prop
* add isRequired to oneOfType proptype to preven null values in highlightRanges prop
* v7: Documentation | Update props used in CodePane (#964)
* docs: remove deprecated props and update to reflect new added props and themes
* add description for the theme prop and highlightRanges prop
* remove stepIndex prop type, to be described in a later PR, and add list of availableCodePaneThemes
* add Default Props column to display theme default prop value
* refactor description of highlightRanges prop from PR feedback
* Changes for version 7.0.0-beta.2
* 7.0.0-beta.2
* Export and Print Mode (#967)
* Added base print mode
* Clean up navigation with new structure.
* Use the correct theme for print vs export mode.
* Update print theme for better printer colors.
* Changes for version 7.0.0-beta.3
* 7.0.0-beta.3
* Update usePresentation hook tests. (#969)
* Cherry Pick: 971 from main
* Add customizable print props and update docs for print props (#972)
* Add customizable print props and update docs for print props
* Remove double propTypes import.
* Changes for version 7.0.0-beta.4
* 7.0.0-beta.4
* Markdown: Fixes and Documentation (#974)
* Fix Notes in Markdown. Update docs for Markdown components.
* Add migration guide for v7
* Changes for version 7.0.0-beta.5
* 7.0.0-beta.5
* Convert functions to arrow functions for js examples (#976)
Co-authored-by: Urmit Patel <upatel@hagerty.com>
* Add Auto-Play support. (#977)
* Add Auto-Play support.
* Simplify tick callback.
* Fix overflow in Presenter Mode for last slide. (#978)
* Fix versions for ESLint for Docs and One Page
* Clean up code.
Co-authored-by: Ryan Roemer <ryan.roemer@formidable.com>
Co-authored-by: Christian Ipanaque <chris.ipanaque@gmail.com>
Co-authored-by: urmit <urmit.patel@formidable.com>
Co-authored-by: Urmit Patel <upatel@hagerty.com>
2021-02-04 07:32:52 -06:00
|
|
|
'react-dom': 'ReactDOM',
|
2022-02-22 07:22:23 -06:00
|
|
|
'react-is': 'ReactIs'
|
|
|
|
|
},
|
|
|
|
|
resolve: {
|
|
|
|
|
extensions: ['.tsx', '.ts', '.jsx', '.js'],
|
|
|
|
|
modules: [path.join(__dirname, 'src'), 'node_modules']
|
2019-06-12 14:54:18 +01:00
|
|
|
},
|
|
|
|
|
module: {
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
2022-02-22 07:22:23 -06:00
|
|
|
test: /\.[tj]sx?$/,
|
2022-08-02 08:13:20 -07:00
|
|
|
use: {
|
|
|
|
|
loader: 'babel-loader',
|
|
|
|
|
// eslint-disable-next-line global-require
|
|
|
|
|
options: require('./.babelrc.js')
|
|
|
|
|
}
|
2019-09-09 06:09:07 -05:00
|
|
|
},
|
2022-02-22 07:22:23 -06:00
|
|
|
{ test: /\.(png|svg|jpg|gif)$/, use: ['file-loader'] }
|
2019-06-12 14:54:18 +01:00
|
|
|
]
|
2022-02-22 07:22:23 -06:00
|
|
|
},
|
|
|
|
|
plugins: [
|
|
|
|
|
new webpack.ProvidePlugin({
|
|
|
|
|
process: 'process/browser'
|
|
|
|
|
})
|
|
|
|
|
]
|
2019-06-12 14:54:18 +01:00
|
|
|
};
|