Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike committed Mar 21, 2020
1 parent 61564f4 commit f35a1e9
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import SimpleHorizontalList from '../../components/simple-horizontal-list'
import SimpleHorizontalList from '../simple-horizontal-list'
import {render} from '../../src'

it('drags an item in front of another', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import SimpleVerticalList from '../../components/simple-vertical-list'
import SimpleVerticalList from '../simple-vertical-list'
import {render} from '../../src'

it('drags an item in front of another', () => {
Expand Down
2 changes: 1 addition & 1 deletion components/simple-horizontal-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface Item {
content: string
}

export default function SimpleVerticalList() {
export default function SimpleHorizontalList() {
const makeItems = (count: number): Item[] =>
Array.from({length: count}, (v, k) => k).map((k) => ({
id: `item-${k}`,
Expand Down
9 changes: 9 additions & 0 deletions declaration.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"noEmit": false,
"declaration": true,
"emitDeclarationOnly": true
},
"exclude": ["**/*.test.ts", "**/*.test.tsx", "components/**/*"]
}
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
setupFilesAfterEnv: ['./tests/setup-env.js'],
setupFilesAfterEnv: ['./setup-env.js'],
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
"description": "Test utils for react-beautiful-dnd",
"main": "dist/index.js",
"scripts": {
"build": "rm -rf dist && babel src -d dist --extensions '.ts,.tsx'",
"test": "jest",
"prettier": "prettier --ignore-path .gitignore \"**/*.+(js|json|ts|tsx)\"",
"format": "npm run prettier -- --write",
"check-format": "npm run prettier -- --list-different",
"lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
"check-types": "tsc",
"declaration:build": "tsc -p declaration.tsconfig.json --outDir dist",
"package.json:copy": "cp package.json dist/",
"build": "rm -rf dist && babel src --ignore **/__tests__,**/__mocks__,**/__utils__,**/*.test.* --out-dir dist --extensions '.ts' && npm run declaration:build && npm run package.json:copy",
"release": "npm version patch && npm run build && cd dist && npm publish",
"postrelease": "npm run dist:remove",
"dist:remove": "rm -rf dist"
},
"author": "Mike Wu <reach@sysdevmike.com> (https://sysdevmike.com)",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import {render} from '../../src/index'
import {render} from '../../index'

it('should throw an error if missing', () => {
expect.assertions(1)
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/test-utils.ts → test-utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//@ts-nocheck

import {CustomQueries} from './../../src/index'
import * as customQueries from '../../src/queries'
import {CustomQueries} from './src/index'
import * as customQueries from './src/queries'

export interface TestRenderResult extends CustomQueries {
container: HTMLElement
Expand Down
12 changes: 0 additions & 12 deletions tests/drag.test.tsx

This file was deleted.

0 comments on commit f35a1e9

Please # to comment.