diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 0ee666f6..00000000 --- a/.babelrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "presets": [ - ["env", { - "targets": { - "browsers": ["last 2 versions"] - }, - "useBuiltins": "usage", - "loose": true - }] - ] -} diff --git a/Makefile b/Makefile deleted file mode 100644 index b1cc814a..00000000 --- a/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -all: - @npm run webpack - -app: - @npm run webpack-app - -browser: - @npm run webpack-browser - -compat: - @npm run webpack-compat - -node: - @npm run webpack-node - -browserify: - @npm run browserify - -clean: - @npm run clean - -docs: - @npm run docs - -lint: - @npm run lint - -test: - @npm test - -.PHONY: all app browser compat node browserify clean docs lint test diff --git a/webpack.app.js b/webpack.app.js deleted file mode 100644 index db860174..00000000 --- a/webpack.app.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -const Path = require('path'); -const webpack = require('webpack'); -const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); -const str = JSON.stringify; -const env = process.env; - -module.exports = { - target: 'web', - entry: { - 'app': './browser/src/app', - 'worker': './lib/workers/worker' - }, - output: { - path: Path.join(__dirname, 'browser'), - filename: '[name].js' - }, - resolve: { - modules: ['node_modules'], - extensions: ['-browser.js', '.js', '.json'] - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env.BCOIN_NETWORK': - str(env.BCOIN_NETWORK || 'main'), - 'process.env.BCOIN_WORKER_FILE': - str(env.BCOIN_WORKER_FILE || '/bcoin-worker.js') - }), - new UglifyJsPlugin() - ] -}; diff --git a/webpack.browser.js b/webpack.browser.js deleted file mode 100644 index 5a8eeb11..00000000 --- a/webpack.browser.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -const Path = require('path'); -const webpack = require('webpack'); -const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); -const str = JSON.stringify; -const env = process.env; - -module.exports = { - target: 'web', - entry: { - 'bcoin': './lib/bcoin', - 'bcoin-worker': './lib/workers/worker' - }, - output: { - library: 'bcoin', - libraryTarget: 'umd', - path: Path.join(__dirname, 'browser'), - filename: '[name].js' - }, - resolve: { - modules: ['node_modules'], - extensions: ['-browser.js', '.js', '.json'] - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env.BCOIN_NETWORK': - str(env.BCOIN_NETWORK || 'main'), - 'process.env.BCOIN_WORKER_FILE': - str(env.BCOIN_WORKER_FILE || '/bcoin-worker.js') - }), - new UglifyJsPlugin() - ] -}; diff --git a/webpack.compat.js b/webpack.compat.js deleted file mode 100644 index 18a54205..00000000 --- a/webpack.compat.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -const Path = require('path'); -const webpack = require('webpack'); -const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); -const str = JSON.stringify; -const env = process.env; - -module.exports = { - target: 'web', - entry: { - 'bcoin': './lib/bcoin', - 'bcoin-worker': './lib/workers/worker' - }, - output: { - library: 'bcoin', - libraryTarget: 'umd', - path: Path.join(__dirname, 'browser'), - filename: '[name].js' - }, - resolve: { - modules: ['node_modules'], - extensions: ['-compat.js', '-browser.js', '.js', '.json'] - }, - module: { - rules: [{ - test: /\.js$/, - loader: 'babel-loader' - }] - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env.BCOIN_NETWORK': - str(env.BCOIN_NETWORK || 'main'), - 'process.env.BCOIN_WORKER_FILE': - str(env.BCOIN_WORKER_FILE || '/bcoin-worker.js') - }), - new UglifyJsPlugin() - ] -};