Skip to content

Commit

Permalink
05 Using Sass, ES6 and Modules
Browse files Browse the repository at this point in the history
  • Loading branch information
alarner committed Jul 29, 2016
1 parent 4f54b5f commit 0533040
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
5 changes: 5 additions & 0 deletions public/scripts/alert.js
@@ -0,0 +1,5 @@
function showMessage() {
alert('This is a new message');
}

module.exports = showMessage;
8 changes: 7 additions & 1 deletion public/scripts/main.js
@@ -1 +1,7 @@
console.log('js working');
const showMessage = require('./alert');
console.log('js working');

const h1 = document.querySelector('h1');
h1.addEventListener('click', () => {
showMessage();
});
9 changes: 9 additions & 0 deletions public/styles/main.scss
@@ -1,3 +1,12 @@
.blue {
background: green;
}

h1 {
color: #333;
font-family: 'Open Sans', sans-serif;

&:hover {
color: #999;
}
}

0 comments on commit 0533040

Please sign in to comment.