refact: bundle package
This commit is contained in:
parent
0f5e2d72f2
commit
96cc794677
13
babel.config.json
Normal file
13
babel.config.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
"@babel/preset-env"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@babel/plugin-proposal-class-properties",
|
||||||
|
{
|
||||||
|
"loose": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
5046
package-lock.json
generated
5046
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "dmein",
|
"name": "dmein",
|
||||||
"version": "0.1.0",
|
"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.",
|
"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",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"test": "tests"
|
"test": "tests"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "webpack --mode production",
|
||||||
"tests": "node ./tests/index.js"
|
"tests": "node ./tests/index.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -21,6 +21,12 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/joshuashoemaker/dmein#readme",
|
"homepage": "https://github.com/joshuashoemaker/dmein#readme",
|
||||||
"devDependencies": {
|
"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
21
src/index.js
Normal 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
15
webpack.config.js
Normal 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"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user