Skip to content

Commit

Permalink
Fix 'new-module' command
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebort committed Apr 4, 2011
1 parent a3b9ef0 commit 0d871b7
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions framework/pym/play/commands/modulesrepo.py
Original file line number Diff line number Diff line change
@@ -187,6 +187,7 @@ def new(app, args, play_env):
replaceAll(os.path.join(app.path, 'build.xml'), r'%MODULE%', application_name)
replaceAll(os.path.join(app.path, 'commands.py'), r'%MODULE%', application_name)
replaceAll(os.path.join(app.path, 'conf/messages'), r'%MODULE%', application_name)
replaceAll(os.path.join(app.path, 'conf/dependencies.yml'), r'%MODULE%', application_name)
replaceAll(os.path.join(app.path, 'conf/routes'), r'%MODULE%', application_name)
replaceAll(os.path.join(app.path, 'conf/routes'), r'%MODULE_LOWERCASE%', string.lower(application_name))
os.mkdir(os.path.join(app.path, 'app'))
8 changes: 6 additions & 2 deletions resources/module-skel/build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<project name="%MODULE%" default="build" basedir=".">

<target name="check" unless="play.path">
<fail message="Please specify Play framework path using -Dplay.path=/path/to/framework/home" />
</target>

<path id="project.classpath">
<pathelement path="${play.path}/framework/classes"/>
@@ -16,7 +20,7 @@
</path>

<target name="build" depends="compile">

<mkdir dir="lib" />
<copy todir="tmp/classes">
<fileset dir="src">
<include name="**/*.properties"/>
@@ -35,7 +39,7 @@
<delete dir="tmp" />
</target>

<target name="compile">
<target name="compile" depends="check">
<mkdir dir="tmp/classes" />
<javac srcdir="src" destdir="tmp/classes" target="1.5" debug="true">
<classpath refid="project.classpath" />
4 changes: 4 additions & 0 deletions resources/module-skel/conf/dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
self: play -> %MODULE% 0.1

require:
- play

0 comments on commit 0d871b7

Please sign in to comment.