refact: bundle package

This commit is contained in:
Joshua Shoemaker 2020-06-23 20:32:45 -05:00
parent 9f3ea3233d
commit 23961c4778
12 changed files with 5103 additions and 16 deletions

13
babel.config.json Normal file
View File

@ -0,0 +1,13 @@
{
"presets": [
"@babel/preset-env"
],
"plugins": [
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
]
}

File diff suppressed because one or more lines are too long

5046
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,13 @@
{
"name": "dmein",
"version": "0.1.0",
"type": "module",
"description": "Dmein is a modern JavaScript Library to create objects that easily mutate data through relationships, filtering, and tranforming the shape of data.",
"main": "index.js",
"directories": {
"test": "tests"
},
"scripts": {
"build": "webpack --mode production",
"tests": "node ./tests/index.js"
},
"repository": {
@ -21,6 +21,12 @@
},
"homepage": "https://github.com/joshuashoemaker/dmein#readme",
"devDependencies": {
"progress": "^2.0.3"
"progress": "^2.0.3",
"@babel/core": "^7.10.3",
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/preset-env": "^7.10.3",
"babel-loader": "^8.1.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12"
}
}

21
src/index.js Normal file
View File

@ -0,0 +1,21 @@
import Table from './entities/Table.js'
import Nodule from './entities/Nodule.js'
import FilterNodule from './entities/nodules/FilterNodule.js'
import JoinNodule from './entities/nodules/JoinNodule.js'
import TransformNodule from './entities/nodules/TransformNodule.js'
export {
Table,
Nodule,
FilterNodule,
JoinNodule,
TransformNodule
}
export default {
Table,
Nodule,
FilterNodule,
JoinNodule,
TransformNodule
}

15
webpack.config.js Normal file
View File

@ -0,0 +1,15 @@
const path = require('path')
module.exports = {
entry: { index: path.resolve(__dirname, 'src', 'index.js') },
output: { path: path.resolve(__dirname) },
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: ["babel-loader"]
}
]
}
}