Skip to content

Commit

Permalink
build(webpack): add webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
euberdeveloper committed Dec 28, 2020
1 parent e56cc48 commit 56c5f72
Show file tree
Hide file tree
Showing 6 changed files with 365 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
dist
bundled
src_backup
config.ts
exported.json
Expand Down
105 changes: 105 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@
"name": "mongoback",
"version": "2.0.5",
"description": "The most powerful npm module to export your MongoDB",
"main": "dist/source/index.js",
"bin": "dist/source/index.bin.js",
"types": "dist/source/index.d.ts",
"main": "bundled/lib/index.js",
"bin": "bundled/bin/index.js",
"types": "bundled/lib/index.d.ts",
"files": [
"package.json",
"dist",
"bundled",
"README.md",
"LICENSE"
],
"scripts": {
"clean": "shx rm -rf dist bundled",
"pretranspile:source": "npm run clean",
"transpile:source": "tsc --project source",
"pretranspile": "npm run clean",
"transpile": "tsc",
"prebundle": "npm run clean",
"bundle": "webpack",
"lint:source": "eslint source --ext ts --format codeframe",
"lint:source:fix": "eslint source --ext ts --format codeframe --fix",
"lint:test": "eslint test --ext ts --format codeframe",
Expand All @@ -29,7 +34,8 @@
"cover:codecov": "nyc report --extension=ts --reporter=text-lcov > coverage.lcov && codecov",
"cover": "npm run cover:coveralls && npm run cover:codecov",
"docs:tree": "dree parse . --dest docs/tree --name tree --options docs/tree/dree.config.json",
"commit": "git-cz"
"commit": "git-cz",
"prepublishOnly": "npm run bundle"
},
"author": "Eugenio Vinicio Berretta <euberdeveloper@gmail.com>",
"license": "ISC",
Expand Down Expand Up @@ -79,6 +85,7 @@
"coveralls": "^3.1.0",
"cz-conventional-changelog": "^3.3.0",
"dree": "^2.5.8",
"dts-bundle-webpack": "^1.0.2",
"eslint": "^7.16.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-prettier": "^3.3.0",
Expand All @@ -88,6 +95,7 @@
"nyc": "^15.1.0",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
"shebang-loader": "0.0.1",
"shx": "^0.3.3",
"sinon": "^9.2.2",
"terser-webpack-plugin": "^5.0.3",
Expand Down
7 changes: 7 additions & 0 deletions source/utils.helper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export * from '@/utils/checkMongoexportInstalled';
export * from '@/utils/connection';
export * from '@/utils/exportCollections';
export * from '@/utils/getParsedCollections';
export * from '@/utils/logger';
export * from '@/utils/options';
export * from '@/utils/getParsedCollections/purgeExportingOptions';
3 changes: 2 additions & 1 deletion test/complete/exported/exported.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export default function (): void {
(_db, collection) =>
+collection > 323
? {
fileName: (_db, collection, type) => `N_${collection}.${type}`,
fileName: (_db: string, collection: string, type: string) =>
`N_${collection}.${type}`,
filePath: () => ``,
prependDbName: false
}
Expand Down

0 comments on commit 56c5f72

Please sign in to comment.