Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated: espower-babel #27

Closed
azu opened this issue Apr 13, 2016 · 2 comments
Closed

Deprecated: espower-babel #27

azu opened this issue Apr 13, 2016 · 2 comments

Comments

@azu
Copy link
Member

azu commented Apr 13, 2016

espower-babel's main purpose is Zero configuration.
Babel@6 break the purpose. So, espower-babel miss the purpose.

Why deprecated?

  • ⬇️ Currently, espower-babel pros is very thin. (also espower-babel miss the first purpose)
  • ⬇️ espower-bebel has not flexibility.
  • ⬆️ Directly using the conbination of babel-register and babel-preset-power-assert
  • ⬆️ Directly using make compile time fast ⏩

Migration to directry use

It is good that we directly use a combination of babel-register and babel-preset-power-assert.

Migration tool: https://github.com/power-assert-js/migrate-espower-babel-to-babel-preset-power-assert

The migration tool convert your project to use babel-register and babel-preset-power-assert.

@azu
Copy link
Member Author

azu commented Apr 15, 2016

@azu
Copy link
Member Author

azu commented May 5, 2016

Tree filed should be modiled.

  • .babelrc
  • package.json
  • mocha.opts if use mocha.opts

migrate-espower-babel-to-babel-preset-power-assert does following

npm uninstall -D espower-babel
npm install -D power-assert
npm install -D babel-preset-power-assert
npm install -D babel-register
rewrite mocha.opts
rewrite .babelrc
diff --git a/.babelrc b/.babelrc
index f3ba72a..22f9d07 100644
--- a/.babelrc
+++ b/.babelrc
@@ -4,5 +4,12 @@
   ],
   "plugins": [
     "add-module-exports"
-  ]
+  ],
+  "env": {
+    "development": {
+      "presets": [
+        "power-assert"
+      ]
+    }
+  }
 }
\ No newline at end of file
diff --git a/package.json b/package.json
index cfe092e..b6bc487 100644
--- a/package.json
+++ b/package.json
@@ -35,8 +35,9 @@
     "babel-cli": "^6.5.1",
     "babel-plugin-add-module-exports": "^0.1.2",
     "babel-preset-es2015": "^6.5.0",
-    "espower-babel": "^4.0.1",
+    "babel-preset-power-assert": "^1.0.0",
+    "babel-register": "^6.8.0",
     "mocha": "^2.3.3",
-    "power-assert": "^1.1.0"
+    "power-assert": "^1.3.1"
   }
 }
diff --git a/test/mocha.opts b/test/mocha.opts
index 8d0282d..b76d223 100644
--- a/test/mocha.opts
+++ b/test/mocha.opts
@@ -1 +1 @@
---compilers js:espower-babel/guess
\ No newline at end of file
+--compilers js:babel-register
\ No newline at end of file

sasaplus1 added a commit to sasaplus1/deepcopy.js that referenced this issue Jul 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant