Skip to content

Instantly share code, notes, and snippets.

Andy Chong Chin Shin Andyccs

Block or report user

Report or block Andyccs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Andyccs
Andyccs / Gruntfile.js
Last active Nov 19, 2015
Medium Post
View Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
"babel": {
options: {
sourceMap: true
},
dist: {
files: {
@Andyccs
Andyccs / app.js
Last active Nov 19, 2015
Medium post
View app.js
import {Rectangle} from "./rectangle.js"
var r = new Rectangle(50, 20)
console.log(r.area === 1000)
@Andyccs
Andyccs / rectangle.js
Last active Nov 19, 2015
Medium post
View rectangle.js
export class Rectangle {
constructor (width, height) {
this.width = width
this.height = height
}
set width (width) { this._width = width }
get width () { return this._width }
set height (height) { this._height = height }
get height () { return this._height }
get area () { return this.width * this.height }
@Andyccs
Andyccs / package.json
Last active Nov 19, 2015
Medium post
View package.json
{
"name": "es6_first_try",
"version": "1.0.0",
"description": "",
"main": "main.js",
"dependencies": {},
"devDependencies": {
"babel-core": "^5.8.22",
"grunt": "^0.4.5",
"grunt-babel": "^5.0.1"
@Andyccs
Andyccs / gist:0bb32b6622293f0f26eb
Last active Aug 29, 2015
Folder structure for medium blog post
View gist:0bb32b6622293f0f26eb
es6_first_try
|-- src
|---- app.js
|---- rectangle.js
|-- Gruntfile.js
|-- package.json
You can’t perform that action at this time.