Skip to content

Commit a4da988

Browse files
committed
create src directory
1 parent feb6e26 commit a4da988

14 files changed

+6
-6
lines changed

benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const { version: latestVersion } = JSON.parse(
2020
const mdIt = new MarkdownIt()
2121
const suite = new BenchTable()
2222

23-
const fixture = fs.readFileSync('./fixture.md', 'utf8')
23+
const fixture = fs.readFileSync('./src/fixture.md', 'utf8')
2424

2525
const bar = new cliProgress.SingleBar(
2626
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"scripts": {
105105
"prepublish": "in-publish && npm run build && npm run release || not-in-publish",
106106
"prebuild": "rimraf dist && mkdirp dist",
107-
"build": "microbundle --tsconfig tsconfig.json -f cjs,umd index.cjs.tsx --name MarkdownToJSX --define process.env.NODE_ENV=production,process.env.DEBUG=0 --globals react=React && microbundle --tsconfig tsconfig.json -f es,modern --name MarkdownToJSX --define process.env.NODE_ENV=production,process.env.DEBUG=0 && microbundle --tsconfig tsconfig.json -f es --define process.env.NODE_ENV=production --no-compress -o dist/debug.mjs",
107+
"build": "microbundle --tsconfig tsconfig.json -f cjs,umd src/index.cjs.tsx --name MarkdownToJSX --define process.env.NODE_ENV=production,process.env.DEBUG=0 --globals react=React && microbundle --tsconfig tsconfig.json -f es,modern --name MarkdownToJSX --define process.env.NODE_ENV=production,process.env.DEBUG=0 src/index.tsx && microbundle --tsconfig tsconfig.json -f es --define process.env.NODE_ENV=production --no-compress -o src/index.tsx dist/debug.mjs",
108108
"build-site": "microbundle site.tsx -o docs -f iife --tsconfig tsconfig.site.json --define process.env.NODE_ENV=production,process.env.DEBUG=0 --jsx React.createElement --external react,react-dom,styled-components,katex --globals react=React,react-dom=ReactDOM,styled-components=styled --no-pkg-main",
109109
"dev": "microbundle watch site.tsx -o docs -f iife --tsconfig tsconfig.site.json --define process.env.NODE_ENV=development --jsx React.createElement --external react,react-dom,styled-components,katex --globals react=React,react-dom=ReactDOM,styled-components=styled --no-pkg-main",
110110
"dev:debug": "microbundle watch --tsconfig tsconfig.json -f es --define process.env.NODE_ENV=production --no-compress -o dist/debug.mjs",

profile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'fs'
22
import { performance } from 'perf_hooks'
33

44
async function main() {
5-
const markdown = fs.readFileSync('fixture.md', 'utf8')
5+
const markdown = fs.readFileSync('./src/fixture.md', 'utf8')
66

77
console.log('Importing markdown-to-jsx...')
88
const { compiler } = await import('./dist/debug.module.js')

site.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from 'react'
33
import * as ReactDOM from 'react-dom'
44
import styled, { createGlobalStyle, css, CSSProp } from 'styled-components'
55
import TeX from '@matejmazur/react-katex'
6-
import Markdown, { MarkdownToJSX, RuleType } from './index'
6+
import Markdown, { MarkdownToJSX, RuleType } from './src/index.tsx'
77

88
declare global {
99
interface Window {
File renamed without changes.
File renamed without changes.
File renamed without changes.

index.compiler.spec.tsx renamed to src/index.compiler.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3051,7 +3051,7 @@ comment -->`)
30513051

30523052
it('handles svg', () => {
30533053
render(
3054-
compiler(fs.readFileSync(__dirname + '/docs/images/logo.svg', 'utf8'))
3054+
compiler(fs.readFileSync(__dirname + '/../docs/images/logo.svg', 'utf8'))
30553055
)
30563056

30573057
expect(root.innerHTML).toMatchInlineSnapshot(`
File renamed without changes.

0 commit comments

Comments
 (0)