1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-09-11 06:35:24 +03:00

Setup for package

This commit is contained in:
Brent Jackson 2018-07-28 19:02:19 -04:00
parent b249baf038
commit 189bd1767a
9 changed files with 19 additions and 4 deletions

7
.babelrc Normal file
View File

@ -0,0 +1,7 @@
{
presets: [
'env',
'stage-0',
'react'
]
}

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
dist

0
.npmignore Normal file
View File

View File

@ -1,7 +1,7 @@
import React from 'react'
import { render } from 'react-dom'
import PropTypes from 'prop-types'
import SlideDeck from './SlideDeck'
import SlideDeck from '../src'
// todo: dynamic import
import slides, {

1
loader.js Normal file
View File

@ -0,0 +1 @@
module.exports = require('./lib/loader')

View File

@ -1,13 +1,14 @@
{
"name": "mdx-deck",
"version": "1.0.0-0",
"description": "",
"main": "index.js",
"description": "MDX-based slide deck presentations",
"main": "dist/index.js",
"bin": {
"mdx-deck": "./cli.js"
},
"scripts": {
"start": "./cli.js docs/index.mdx"
"prepare": "babel src -d dist",
"start": "./cli.js docs/index.mdx -p 8989"
},
"keywords": [],
"author": "Brent Jackson",
@ -33,5 +34,8 @@
"styled-components": "^3.3.3",
"styled-system": "^3.0.2",
"superbox": "^2.1.0"
},
"devDependencies": {
"babel-cli": "^6.26.0"
}
}

View File

@ -7,6 +7,8 @@ import debounce from 'lodash.debounce'
import defaultTheme from './theme'
import defaultComponents from './components'
export { default as theme } from './theme'
export { default as components } from './components'
export const inc = state => ({ index: (state.index + 1) % state.length })
export const dec = state => state.index > 0