Add rollup es build, major cleanup

This commit is contained in:
Shawn 2019-04-03 16:34:07 -05:00
parent d9f9035113
commit 120d3bf6df
10 changed files with 5467 additions and 8356 deletions

View file

@ -1,4 +1,6 @@
{
"presets": ["env", "stage-2"],
"plugins": ["transform-flow-comments"]
"presets": ["@babel/preset-env"],
"plugins": [
"@babel/plugin-transform-flow-strip-types"
]
}

2589
dist/bundle.es.js vendored Normal file

File diff suppressed because it is too large Load diff

10032
dist/bundle.js vendored

File diff suppressed because it is too large Load diff

View file

@ -19,8 +19,9 @@
"email": "hello@lbry.io"
},
"main": "dist/bundle.js",
"module": "dist/bundle.es.js",
"scripts": {
"build": "webpack",
"build": "rollup --config && webpack",
"dev": "webpack --watch",
"precommit": "lint-staged",
"preinstall": "yarn cache clean lbry-redux",
@ -28,19 +29,20 @@
"format": "prettier 'src/**/*.{js,json}' --write"
},
"dependencies": {
"bluebird": "^3.5.1",
"reselect": "^3.0.0"
},
"peerDependencies": {
"lbry-redux": "lbryio/lbry-redux"
},
"devDependencies": {
"babel-core": "^6.26.0",
"@babel/core": "^7.4.3",
"@babel/plugin-transform-flow-strip-types": "^7.4.0",
"@babel/preset-env": "^7.4.3",
"@babel/preset-stage-2": "^7.0.0",
"babel-eslint": "^8.0.3",
"babel-loader": "^7.1.4",
"babel-loader": "^8.0.5",
"babel-plugin-module-resolver": "^3.0.0",
"babel-preset-env": "^1.6.1",
"babel-preset-stage-2": "^6.18.0",
"cross-env": "^5.2.0",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-prettier": "^2.9.0",
@ -48,13 +50,16 @@
"eslint-plugin-flowtype": "^2.40.1",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-prettier": "^2.4.0",
"flow-babel-webpack-plugin": "^1.1.1",
"flow-bin": "^0.69.0",
"flow-typed": "^2.4.0",
"husky": "^0.14.3",
"lbry-redux": "lbryio/lbry-redux",
"lint-staged": "^7.0.4",
"prettier": "^1.4.2",
"rollup": "^1.8.0",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-flow": "^1.1.1",
"rollup-plugin-includepaths": "^0.2.3",
"webpack": "^4.5.0",
"webpack-cli": "^2.0.14"
},

27
rollup.config.js Normal file
View file

@ -0,0 +1,27 @@
import babel from 'rollup-plugin-babel';
import flow from 'rollup-plugin-flow';
import includePaths from 'rollup-plugin-includepaths';
let includePathOptions = {
include: {},
paths: ['src'],
external: [],
extensions: ['.js']
};
export default {
input: 'src/index.js',
output: {
file: 'dist/bundle.es.js',
format: 'cjs'
},
plugins: [
flow({ all: true }),
includePaths(includePathOptions),
babel({
babelrc: false,
presets: [],
}),
],
external: ['lbry-redux']
}

View file

@ -85,10 +85,7 @@ export {
selectFetchingRewards,
selectUnclaimedRewardValue,
selectClaimsPendingByType,
selectIsClaimRewardPending,
selectClaimErrorsByType,
selectClaimRewardError,
selectRewardByType,
selectRewardContentClaimIds,
selectReferralReward,
} from 'redux/selectors/rewards';

View file

@ -16,9 +16,6 @@ import * as ACTIONS from 'constants/action_types';
import * as NOTIFICATION_TYPES from 'constants/subscriptions';
import Lbryio from 'lbryio';
import rewards from 'rewards';
import Promise from 'bluebird';
// import * as SETTINGS from 'constants/settings';
// import { makeSelectClientSetting } from 'redux/selectors/settings';
const CHECK_SUBSCRIPTIONS_INTERVAL = 15 * 60 * 1000;
const SUBSCRIPTION_DOWNLOAD_LIMIT = 1;

View file

@ -7,7 +7,6 @@ import {
} from 'redux/selectors/user';
import rewards from 'rewards';
import Lbryio from 'lbryio';
import Promise from 'bluebird';
export function doFetchInviteStatus() {
return dispatch => {

View file

@ -1,6 +1,5 @@
/* eslint-disable import/no-commonjs */
const path = require('path');
const FlowBabelWebpackPlugin = require('flow-babel-webpack-plugin');
module.exports = {
mode: 'none',
@ -22,6 +21,5 @@ module.exports = {
resolve: {
modules: [path.resolve(__dirname, 'src'), 'node_modules'],
},
plugins: [new FlowBabelWebpackPlugin()],
externals: 'lbry-redux',
};

1141
yarn.lock

File diff suppressed because it is too large Load diff