Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"presets": ["@babel/preset-env"],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/pkg
/dist
/node_modules
/yarn.lock
1 change: 0 additions & 1 deletion index.js

This file was deleted.

43 changes: 28 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,46 @@
"author": "Charles Lowell <cowboyd@frontside.io>",
"license": "MIT",
"private": false,
"main": "dist/microtates-union.cjs.js",
"module": "dist/microtates-union.es.js",
"unpkg": "dist/microtates-union.umd.js",
"browser": "dist/microtates-union.umd.js",
"scripts": {
"test": "mocha --recursive -r tests/setup tests",
"build": "rollup -c",
"prepare": "npm run build",
"prerelease": "npm test && npm run build"
"build": "pack build",
"prepare": "yarn build",
"publish": "pack publish",
"prepublishOnly": "yarn test && yarn build"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.0.0",
"@pika/pack": "^0.3.5",
"@pika/plugin-build-node": "^0.3.14",
"@pika/plugin-build-web": "^0.3.14",
"@pika/plugin-standard-pkg": "0.3.14",
"babel-eslint": "^10.0.1",
"expect": "^24.1.0",
"mocha": "^5.2.0",
"rollup": "^1.0.0",
"rollup-plugin-babel": "4.3.1",
"rollup-plugin-commonjs": "9.2.0",
"rollup-plugin-filesize": "6.0.0",
"rollup-plugin-node-resolve": "4.0.0",
"rollup-plugin-replace": "2.1.0",
"microstates": "^0.13.0"
"microstates": "^0.13.0",
"mocha": "^5.2.0"
},
"peerDependencies": {
"microstates": "^0.13.0"
},
"@pika/pack": {
"pipeline": [
[
"@pika/plugin-standard-pkg",
{
"exclude": [
"__tests__/**/*"
]
}
],
[
"@pika/plugin-build-node"
],
[
"@pika/plugin-build-web"
]
]
}
}
109 changes: 0 additions & 109 deletions rollup.config.js

This file was deleted.

4 changes: 1 addition & 3 deletions src/union.js → src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import * as M from 'microstates';

const { create, valueOf } = M;
import { create, valueOf } from 'microstates';

export default function Union(members, Base = class {}) {
let types = Object.keys(members);
Expand Down
9 changes: 0 additions & 9 deletions tests/index.test.js

This file was deleted.

1 change: 1 addition & 0 deletions tests/setup
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ require("@babel/register")({
// This will override `node_modules` ignoring - you can alternatively pass
// an array of strings to be explicitly matched or a regex / glob
ignore: ['node_modules/*'],
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-proposal-class-properties'
]
Expand Down
2 changes: 1 addition & 1 deletion tests/union.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import expect from 'expect';

import Union from '../src/union';
import Union from '../src';
import { create } from 'microstates';

describe('Using a union type to construct a Maybe value', ()=> {
Expand Down