Skip to content
Browse files

Moved the CS templates to their own Coffeescript file.

  • Loading branch information...
1 parent bff96b6 commit 7980b000a9916147693d7f0b282560527922d24a @mr-rock mr-rock committed Mar 11, 2012
Showing with 32 additions and 33 deletions.
  1. +31 −0 .alice/coffeescript
  2. +0 −33 .alice/templates
  3. +1 −0 Makefile
View
31 .alice/coffeescript
@@ -0,0 +1,31 @@
+MODULE_CS = "module.exports = {\
+\n\t\#example = 0\
+\n\n\tmethod1: ->\
+\n\t\t\# ... your code goes in here ...\
+\n\n\tmethod2: ->\
+\n\t\t\# ... your code goes in here ...\
+\n}"
+
+ifeq "$(GROUP)" ""
+TESTMODULE_CS = "describe '$(NAME)', ->\
+\n\t$(NAME_CAMELIZED) = require '../../$(SOURCES_DIRECTORY)/$(LIBRARIES_DIRECTORY)/$(NAME_CAMELIZED)'"
+else
+TESTMODULE_CS = "describe '$(GROUP) > $(NAME)', ->\
+\n\t$(NAME_CAMELIZED) = require '../../../$(SOURCES_DIRECTORY)/$(LIBRARIES_DIRECTORY)/$(GROUP_CAMELIZED)/$(NAME_CAMELIZED)'"
+endif
+
+TESTMODULE_CS += "\n\n\tdescribe '\#example', ->\
+\n\t\tit 'should not exist', (done) ->\
+\n\t\t\t$(NAME_CAMELIZED).should.not.have.property 'example'\
+\n\t\t\tdone()\
+\n\t\t\treturn\
+\n\n\tdescribe '\#method1()', ->\
+\n\t\tit 'should exist', (done) ->\
+\n\t\t\t$(NAME_CAMELIZED).should.have.property 'method1'\
+\n\t\t\tdone()\
+\n\t\t\treturn\
+\n\n\tdescribe '\#method2()', ->\
+\n\t\tit 'should exist', (done) ->\
+\n\t\t\t$(NAME_CAMELIZED).should.have.property 'method2'\
+\n\t\t\tdone()\
+\n\t\t\treturn"
View
33 .alice/templates
@@ -39,39 +39,6 @@ GITIGNORE += "\n$(BINARIES_DIRECTORY)/\
\n$(LIBRARIES_DIRECTORY)/"
endif
-
-MODULE_CS = "module.exports = {\
-\n\t\#example = 0\
-\n\n\tmethod1: ->\
-\n\t\t\# ... your code goes in here ...\
-\n\n\tmethod2: ->\
-\n\t\t\# ... your code goes in here ...\
-\n}"
-
-ifeq "$(GROUP)" ""
-TESTMODULE_CS = "describe '$(NAME)', ->\
-\n\t$(NAME_CAMELIZED) = require '../../$(SOURCES_DIRECTORY)/$(LIBRARIES_DIRECTORY)/$(NAME_CAMELIZED)'"
-else
-TESTMODULE_CS = "describe '$(GROUP) > $(NAME)', ->\
-\n\t$(NAME_CAMELIZED) = require '../../../$(SOURCES_DIRECTORY)/$(LIBRARIES_DIRECTORY)/$(GROUP_CAMELIZED)/$(NAME_CAMELIZED)'"
-endif
-
-TESTMODULE_CS += "\n\n\tdescribe '\#example', ->\
-\n\t\tit 'should not exist', (done) ->\
-\n\t\t\t$(NAME_CAMELIZED).should.not.have.property 'example'\
-\n\t\t\tdone()\
-\n\t\t\treturn\
-\n\n\tdescribe '\#method1()', ->\
-\n\t\tit 'should exist', (done) ->\
-\n\t\t\t$(NAME_CAMELIZED).should.have.property 'method1'\
-\n\t\t\tdone()\
-\n\t\t\treturn\
-\n\n\tdescribe '\#method2()', ->\
-\n\t\tit 'should exist', (done) ->\
-\n\t\t\t$(NAME_CAMELIZED).should.have.property 'method2'\
-\n\t\t\tdone()\
-\n\t\t\treturn"
-
PACKAGE = '{\
\n\t"name": "$(LIB_NAME)",\
\n\t"description": "Project description goes here...",\
View
1 Makefile
@@ -3,6 +3,7 @@ include .alice/directories
include .alice/executables
include .alice/templates
include .alice/javascript
+include .alice/coffeescript
include .alice/test
include .alice/licenses

0 comments on commit 7980b00

Please sign in to comment.
Something went wrong with that request. Please try again.