Skip to content

Commit

Permalink
config babel
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristiana Passos committed May 16, 2020
1 parent 6304e4a commit a7b6ebf
Show file tree
Hide file tree
Showing 8 changed files with 2,080 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions es6/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": [
"@babel/preset-env"
]
}
1 change: 1 addition & 0 deletions es6/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
25 changes: 25 additions & 0 deletions es6/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"use strict";

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

alert("teste");

var Teste = /*#__PURE__*/function () {
function Teste() {
_classCallCheck(this, Teste);
}

_createClass(Teste, [{
key: "method",
value: function method() {}
}, {
key: "one",
value: function one() {}
}]);

return Teste;
}();
15 changes: 15 additions & 0 deletions es6/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>

<body>

<script src="./bundle.js"></script>
</body>

</html>
7 changes: 7 additions & 0 deletions es6/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
alert("teste");

class Teste {
method() {}

one() {}
}
14 changes: 14 additions & 0 deletions es6/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "es6",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.6",
"@babel/preset-env": "^7.9.6"
},
"scripts": {
"dev": "babel ./main.js -o ./bundle.js -w"
}
}
2,013 changes: 2,013 additions & 0 deletions es6/yarn.lock

Large diffs are not rendered by default.

0 comments on commit a7b6ebf

Please sign in to comment.