Skip to content

Commit

Permalink
Refactor file structure & build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Steam committed Mar 12, 2020
1 parent 929fd7b commit 8c95823
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
"jest-chrome.d.ts"
],
"scripts": {
"build": "run-p build:pro build:types build:copy",
"build": "run-s build:clean build:pro build:types build:copy",
"build:copy": "copyfiles -f src/jest-chrome.d.ts types",
"build:dev": "rollup -c --environment NODE_ENV:development",
"build:pro": "rollup -c --environment NODE_ENV:production",
"build:types": "tsc -p tsconfig.d.json",
"build:clean": "rm -rf lib types",
"build:watch": "npm run build:dev -- -w",
"release:beta": "git push && npm publish --tag beta",
"release:full": "git push && npm publish",
Expand Down
2 changes: 1 addition & 1 deletion src/add-elements.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createEvent } from './create-event'
import { Storage } from '../jest-chrome'
import { Storage } from './jest-chrome'

/**
* Namespace member data format from jest-chrome-schema.json
Expand Down
4 changes: 2 additions & 2 deletions src/createHandler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import jestChromeSchema from '../jest-chrome-schema.json';
import jestChromeSchema from './jest-chrome-schema.json';
import { addEvent, addFunction, addProperty } from './add-elements';
import { JestChrome } from '../jest-chrome';
import { JestChrome } from './jest-chrome';

export function createHandler(schema = jestChromeSchema as any): ProxyHandler<JestChrome> {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { chrome } from '.'
import { Storage, Runtime } from '../jest-chrome'
import { Storage, Runtime } from './jest-chrome'
import {
CallableEvent,
EventCallback,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JestChrome } from '../jest-chrome'
import { JestChrome } from './jest-chrome'
import { createHandler } from './createHandler'

export const chrome = new Proxy<JestChrome>(
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion jest-chrome.d.ts → src/jest-chrome.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-shadow-restricted-names */
import { CallableEvent, EventCallback, MonotypeEventSelector } from './src/create-event'
import { CallableEvent, EventCallback, MonotypeEventSelector } from './create-event'

// Derived from @types/chrome:
// Type definitions for Chrome extension development
Expand Down

0 comments on commit 8c95823

Please sign in to comment.