Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moved the JS templates to their own Javascript file.

  • Loading branch information...
commit bff96b6852b37c8a92279ef99d52a487cc4b7196 1 parent 47725bd
@mr-rock mr-rock authored
Showing with 40 additions and 39 deletions.
  1. +39 −0 .alice/javascript
  2. +0 −39 .alice/templates
  3. +1 −0  Makefile
View
39 .alice/javascript
@@ -0,0 +1,39 @@
+INDEX_JS = "module.exports = require('./$(LIBRARIES_DIRECTORY)/$(LIB_NAME)');"
+
+MODULE_JS = "module.exports = {\
+\n\t//var example = 0;\
+\n\n\tmethod1: function(){\
+\n\t\t// ... your code goes in here ...\
+\n\t},\
+\n\tmethod2: function(){\
+\n\t\t// ... your code goes in here ...\
+\n\t}\
+\n};"
+
+ifeq "$(GROUP)" ""
+TESTMODULE_JS = "describe('$(NAME)', function(){\
+\n\tvar $(NAME_CAMELIZED) = require('../../$(LIBRARIES_DIRECTORY)/$(NAME_CAMELIZED)');"
+else
+TESTMODULE_JS = "describe('$(GROUP) > $(NAME)', function(){\
+\n\tvar $(NAME_CAMELIZED) = require('../../../$(LIBRARIES_DIRECTORY)/$(GROUP_CAMELIZED)/$(NAME_CAMELIZED)');"
+endif
+
+TESTMODULE_JS += "\n\n\tdescribe('\#example', function(){\
+\n\t\tit('should not exist', function(done){\
+\n\t\t\t$(NAME_CAMELIZED).should.not.have.property('example');\
+\n\t\t\tdone();\
+\n\t\t});\
+\n\t});\
+\n\n\tdescribe('\#method1()', function(){\
+\n\t\tit('should exist.', function(done){\
+\n\t\t\t$(NAME_CAMELIZED).should.have.property('method1');\
+\n\t\t\tdone();\
+\n\t\t});\
+\n\t});\
+\n\n\tdescribe('\#method2()', function(){\
+\n\t\tit('should exist.', function(done){\
+\n\t\t\t$(NAME_CAMELIZED).should.have.property('method2');\
+\n\t\t\tdone();\
+\n\t\t});\
+\n\t});\
+\n})"
View
39 .alice/templates
@@ -39,15 +39,6 @@ GITIGNORE += "\n$(BINARIES_DIRECTORY)/\
\n$(LIBRARIES_DIRECTORY)/"
endif
-MODULE_JS = "module.exports = {\
-\n\t//var example = 0;\
-\n\n\tmethod1: function(){\
-\n\t\t// ... your code goes in here ...\
-\n\t},\
-\n\tmethod2: function(){\
-\n\t\t// ... your code goes in here ...\
-\n\t}\
-\n};"
MODULE_CS = "module.exports = {\
\n\t\#example = 0\
@@ -58,34 +49,6 @@ MODULE_CS = "module.exports = {\
\n}"
ifeq "$(GROUP)" ""
-TESTMODULE_JS = "describe('$(NAME)', function(){\
-\n\tvar $(NAME_CAMELIZED) = require('../../$(LIBRARIES_DIRECTORY)/$(NAME_CAMELIZED)');"
-else
-TESTMODULE_JS = "describe('$(GROUP) > $(NAME)', function(){\
-\n\tvar $(NAME_CAMELIZED) = require('../../../$(LIBRARIES_DIRECTORY)/$(GROUP_CAMELIZED)/$(NAME_CAMELIZED)');"
-endif
-
-TESTMODULE_JS += "\n\n\tdescribe('\#example', function(){\
-\n\t\tit('should not exist', function(done){\
-\n\t\t\t$(NAME_CAMELIZED).should.not.have.property('example');\
-\n\t\t\tdone();\
-\n\t\t});\
-\n\t});\
-\n\n\tdescribe('\#method1()', function(){\
-\n\t\tit('should exist.', function(done){\
-\n\t\t\t$(NAME_CAMELIZED).should.have.property('method1');\
-\n\t\t\tdone();\
-\n\t\t});\
-\n\t});\
-\n\n\tdescribe('\#method2()', function(){\
-\n\t\tit('should exist.', function(done){\
-\n\t\t\t$(NAME_CAMELIZED).should.have.property('method2');\
-\n\t\t\tdone();\
-\n\t\t});\
-\n\t});\
-\n})"
-
-ifeq "$(GROUP)" ""
TESTMODULE_CS = "describe '$(NAME)', ->\
\n\t$(NAME_CAMELIZED) = require '../../$(SOURCES_DIRECTORY)/$(LIBRARIES_DIRECTORY)/$(NAME_CAMELIZED)'"
else
@@ -109,8 +72,6 @@ TESTMODULE_CS += "\n\n\tdescribe '\#example', ->\
\n\t\t\tdone()\
\n\t\t\treturn"
-INDEX_JS = "module.exports = require('./$(LIBRARIES_DIRECTORY)/$(LIB_NAME)');"
-
PACKAGE = '{\
\n\t"name": "$(LIB_NAME)",\
\n\t"description": "Project description goes here...",\
View
1  Makefile
@@ -2,6 +2,7 @@ include .alice/setup
include .alice/directories
include .alice/executables
include .alice/templates
+include .alice/javascript
include .alice/test
include .alice/licenses
Please sign in to comment.
Something went wrong with that request. Please try again.