diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index 9098e5259..a86c7c1f4 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -90,9 +90,6 @@ module.exports = (grunt) -> path.join('snippets', 'node_modules', 'pegjs') path.join('snippets', 'node_modules', '.bin', 'pegjs') - # These aren't needed since WeakMap is built-in - path.join('property-accessors', 'node_modules', 'es6-weak-map') - '.DS_Store' '.jshintrc' '.npmignore' diff --git a/package.json b/package.json index 872d15634..52210a81d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "nslog": "^2.0.0", "oniguruma": "^4.2.4", "pathwatcher": "^5.0.0", - "property-accessors": "^1.1.3", "random-words": "0.0.1", "runas": "2.0.0", "scandal": "2.1.2", diff --git a/src/model.coffee b/src/model.coffee index 1cea87665..94c06a76f 100644 --- a/src/model.coffee +++ b/src/model.coffee @@ -1,11 +1,7 @@ -PropertyAccessors = require 'property-accessors' - nextInstanceId = 1 module.exports = class Model - PropertyAccessors.includeInto(this) - @resetNextInstanceId: -> nextInstanceId = 1 alive: true @@ -15,9 +11,7 @@ class Model assignId: (id) -> @id ?= id ? nextInstanceId++ - - @::advisedAccessor 'id', - set: (id) -> nextInstanceId = id + 1 if id >= nextInstanceId + nextInstanceId = id + 1 if id >= nextInstanceId destroy: -> return unless @isAlive()