From a85472ebb3e6d4145ea4c26335dccd05d2fcce39 Mon Sep 17 00:00:00 2001 From: Guilherme Ventura Date: Mon, 9 Mar 2020 13:20:31 -0300 Subject: [PATCH] feat(Build/Lib): Setting build lib without babel and webpack --- babel.config.json | 5 ----- package.json | 3 +-- src/helpers/index.js | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 babel.config.json diff --git a/babel.config.json b/babel.config.json deleted file mode 100644 index b4df3fa..0000000 --- a/babel.config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "presets": ["@babel/preset-env"], - "plugins": ["@babel/plugin-transform-runtime"], - "sourceType": "unambiguous" -} diff --git a/package.json b/package.json index e5c2d02..e231570 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "bin": "./lib/index.js", "scripts": { "clean": "rimraf lib", - "build": "cpy --dot src/files lib/files && babel src -d lib", + "build": "ncp src lib", "prebuild": "yarn clean", "prepublishOnly": "yarn build", "version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md", @@ -42,7 +42,6 @@ "@babel/preset-env": "^7.8.7", "babel-eslint": "^10.1.0", "conventional-changelog-cli": "^2.0.31", - "cpy-cli": "^3.1.0", "eslint": "^6.7.2", "eslint-config-prettier": "^6.7.0", "eslint-plugin-import": "^2.19.1", diff --git a/src/helpers/index.js b/src/helpers/index.js index 3cb6b0a..29faf9c 100644 --- a/src/helpers/index.js +++ b/src/helpers/index.js @@ -77,7 +77,7 @@ function readJS(path) { return new Promise(resolve => { try { // eslint-disable-next-line no-undef - const file = __non_webpack_require__(path) + const file = require(path) resolve(file) } catch (err) { console.log('erro ', path)