Skip to content

Commit 1e9a8cf

Browse files
committed
Updated ES6 Tooling code base
1 parent 502c648 commit 1e9a8cf

5 files changed

Lines changed: 37 additions & 2 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function addTax(amount, taxRate) {
2+
return amount + (amount * taxRate);
3+
}

14 - ES6 Tooling/systemjs/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
<body>
88
<script src="https://jspm.io/system@0.19.js"></script>
99
<script>
10-
10+
System.config({ transpiler: 'babel' });
11+
System.import('./main.js');
1112
</script>
1213
</body>
1314
</html>

14 - ES6 Tooling/systemjs/main.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* eslint-disable */
2+
3+
import { sum, kebabCase } from 'npm:lodash';
4+
import { addTax } from './checkout';
5+
6+
console.log(kebabCase('Wes is soooo cool ⛓⛓⛓⛓'));
7+
8+
console.log(addTax(100, 0.25));
9+
10+
/* eslint-enable */
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "systemjs",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"scripts": {
6+
"server": "browser-sync start --directory --server --files '*.js, *.html, *.css'"
7+
},
8+
"author": "",
9+
"license": "ISC",
10+
"description": "",
11+
"devDependencies": {
12+
"browser-sync": "2.18.12"
13+
}
14+
}

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,11 @@ Completed Module #11 - Symbols (Newest primitive data type)
121121

122122
### Day 15: 29 May 2017
123123
**Thoughts:**
124-
-
124+
- Completed Module #14 - ES6 Tooling
125+
- Learnt about SystemJS, Babel & [Polyfills](https://polyfill.io/v2/docs/) for ES6
126+
- Polyfills gives very good coverage for all ES6 features in old browsers
127+
128+
### Day 16: 30 May 2017
129+
130+
131+

0 commit comments

Comments
 (0)