1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-29 13:58:02 +03:00

Adjust build setup

This commit is contained in:
Brent Jackson 2019-02-17 15:43:39 -05:00
parent d353014be8
commit 98ea2d7578
5 changed files with 4 additions and 35 deletions

View File

@ -1,7 +0,0 @@
module.exports = {
presets: ['@babel/env', '@babel/react'],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-export-namespace-from',
],
}

View File

@ -1,4 +1,4 @@
import { Head, Image, Notes, Appear } from '../dist'
import { Head, Image, Notes, Appear } from '..'
<Head>
<title>MDX Deck Demo</title>

View File

@ -52,30 +52,6 @@ const rules = [
},
]
/*
const template = ({
head = '<title>mdx-deck</title>',
css = '',
body = '',
js,
publicPath,
}) => `<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<style>*{box-sizing:border-box}body{font-family:system-ui,sans-serif;margin:0}</style>
<meta name='generator' content='mdx-deck'>
${head}${css}
</head>
<body>
<div id=root>${body}</div>
${HTMLPlugin.generateJSReferences(js, publicPath)}
</body>
</html>
`
*/
const baseConfig = {
stats: 'errors-only',
mode: 'development',
@ -111,7 +87,7 @@ const createConfig = (opts = {}) => {
path.join(opts.dirname, 'node_modules')
)
config.entry = [path.join(__dirname, '../dist/entry.js')]
config.entry = [path.join(__dirname, '../src/entry.js')]
const defs = Object.assign({}, opts.globals, {
OPTIONS: JSON.stringify(opts),

View File

@ -72,6 +72,7 @@ const defaultTemplate = ({
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<style>*{box-sizing:border-box}body{margin:0;font-family:system-ui,sans-serif}</style>
<meta name='generator' content='mdx-deck'>
${head}${css}${links}
</head>
<body>

View File

@ -2,12 +2,11 @@
"name": "mdx-deck",
"version": "1.8.2",
"description": "MDX-based presentation decks",
"main": "dist/index.js",
"main": "src/index.js",
"bin": {
"mdx-deck": "./cli.js"
},
"scripts": {
"prepare": "babel src -d dist",
"watch": "babel src -d dist --watch",
"start": "./cli.js docs/index.mdx -p 8080",
"build": "./cli.js build docs/index.mdx -d site",