Browse files

All JS under lib by default in archetype, Python install

  • Loading branch information...
1 parent c78613b commit 231167f48e5aa055fa0f3e182845607bf49ba469 @parente parente committed Mar 15, 2011
View
6 js/test/index.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://code.jquery.com/qunit/git/qunit.js"></script>
- <script src="../coweb-lib/require.js"></script>
+ <script src="../lib/require.js"></script>
<script type="text/javascript">
// don't run until requirejs says run
QUnit.config.autostart = false;
@@ -15,8 +15,8 @@
require({
baseUrl : '.',
paths : {
- 'coweb' : '../coweb-lib/coweb',
- 'org' : '../coweb-lib/org'
+ 'coweb' : '../lib/coweb',
+ 'org' : '../lib/org'
}
}, [
'test_openg_trans',
View
2 servers/java/coweb-archetype/src/main/resources/archetype-resources/pom.xml
@@ -46,7 +46,7 @@
<exclude>META-INF/**</exclude>
<exclude>WEB-INF/**</exclude>
</excludes>
- <targetPath>coweb-lib</targetPath>
+ <targetPath>lib</targetPath>
</overlay>
</overlays>
</configuration>
View
2 ...rs/java/coweb-archetype/src/main/resources/archetype-resources/src/main/webapp/index.html
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title>My Cooperative Web Application</title>
- <script data-main="main" src="coweb-lib/require.js"></script>
+ <script data-main="main" src="lib/require.js"></script>
</head>
<body>
</body>
View
11 servers/java/coweb-archetype/src/main/resources/archetype-resources/src/main/webapp/main.js
@@ -9,16 +9,7 @@ var cowebConfig = {
adminUrl : './admin'
};
-require({
- // assumes the coweb module is under coweb-lib
- paths : {
- coweb : 'coweb-lib/coweb',
- org : 'coweb-lib/org'
- }
-}, [
- 'coweb/main'
-], function(coweb) {
-
+require({moduleUrl : 'lib'}, ['coweb/main'], function(coweb) {
// do application setup here
require.ready(function() {
View
2 servers/python/pycoweb
@@ -26,7 +26,7 @@ def deploy(options, args):
# paths
www = os.path.join(outPath, 'www')
- lib = os.path.join(www, 'coweb-lib')
+ lib = os.path.join(www, 'lib')
bots = os.path.join(outPath, 'bots')
bin = os.path.join(outPath, 'bin')
script = os.path.join(bin, 'run_server.py')
View
16 servers/python/setup_devenv.py
@@ -24,14 +24,22 @@ def after_install(options, home_dir):
subprocess.check_call([pip, 'install', '-e', '.'])
# create an empty deployment
- subprocess.check_call([pycoweb, 'deploy', home_dir, '-v', '--no-js', '--force'])
+ subprocess.check_call([pycoweb, 'deploy', home_dir, '--no-js', '--force'])
# run setup_js.sh
if subprocess.call(['../../js/setup_js.sh']):
raise RuntimeError('could not install JS dependencies')
- # symlink js/lib into home_dir/www/coweb-lib
- lib = os.path.abspath('../../js/lib/')
- os.symlink(lib, os.path.join(www, 'coweb-lib'))
+ try:
+ os.makedirs(os.path.join(www, 'lib'))
+ except OSError:
+ pass
+ # symlink js/lib/*coweb into home_dir/www/lib/*
+ lib = os.path.abspath('../../js/lib/org')
+ os.symlink(lib, os.path.join(www, 'lib/org'))
+ lib = os.path.abspath('../../js/lib/coweb')
+ os.symlink(lib, os.path.join(www, 'lib/coweb'))
+ lib = os.path.abspath('../../js/lib/require.js')
+ os.symlink(lib, os.path.join(www, 'lib/require.js'))
# symlink tests into home_dir/www
src = os.path.abspath('../../js/test/')
os.symlink(src, os.path.join(www, 'test'))

0 comments on commit 231167f

Please sign in to comment.