mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
cli moving to a phonegap folder, local to the proj and tests
This commit is contained in:
parent
e7f206b598
commit
d34dcf8ee5
@ -43,4 +43,4 @@ ACTIVITY=$ACTIVITY
|
||||
TARGET=$TARGET
|
||||
eom
|
||||
|
||||
(cd $PROJECT_PATH && ./bin/create)
|
||||
(cd $PROJECT_PATH && ./phonegap/create)
|
||||
|
1
bin/templates/project/.phonegap/android/readme.md
Normal file
1
bin/templates/project/.phonegap/android/readme.md
Normal file
@ -0,0 +1 @@
|
||||
ok...
|
3
bin/templates/project/.phonegap/readme.md
Normal file
3
bin/templates/project/.phonegap/readme.md
Normal file
@ -0,0 +1,3 @@
|
||||
this is local config for phonegap stuff to be eventually moved to
|
||||
config.xml ...we think. feedback to @davejohnson/@brianleroux
|
||||
appreciated here!
|
@ -16,8 +16,8 @@ MANIFEST_PATH=./AndroidManifest.xml
|
||||
# create the project
|
||||
android create project --target $TARGET --path . --package $PACKAGE --activity $ACTIVITY
|
||||
|
||||
# copy all the bin scripts etc in there
|
||||
cp -R ./bin/templates/project/ .
|
||||
# copy all the phonegap scripts etc in there
|
||||
cp -R ./phonegap/templates/project/ .
|
||||
|
||||
# copy in phonegap.js
|
||||
cp ./.phonegap/android/phonegap-$VERSION.js ./assets/www
|
||||
@ -26,11 +26,11 @@ cp ./.phonegap/android/phonegap-$VERSION.js ./assets/www
|
||||
cp ./.phonegap/android/phonegap-$VERSION.jar ./libs
|
||||
|
||||
# copy in default activity
|
||||
cat ./bin/templates/Activity.java > $ACTIVITY_PATH
|
||||
cat ./phonegap/templates/Activity.java > $ACTIVITY_PATH
|
||||
|
||||
# interpolate the acivity name and package
|
||||
find "$ACTIVITY_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i "" "s/__ACTIVITY__/${ACTIVITY}/g"
|
||||
find "$ACTIVITY_PATH" | xargs grep '__ID__' -sl | xargs -L1 sed -i "" "s/__ID__/${PACKAGE}/g"
|
||||
|
||||
find "$MANIFEST_PATH" | xargs grep '__ACTIVITY__' -sl | xargs -L1 sed -i "" "s/__ACTIVITY__/${ACTIVITY}/g"
|
||||
find "$MANIFEST_PATH" | xargs grep '__PACKAGE__' -sl | xargs -L1 sed -i "" "s/__PACKAGE__/${PACKAGE}/g"
|
||||
find "$MANIFEST_PATH" | xargs grep '__PACKAGE__' -sl | xargs -L1 sed -i "" "s/__PACKAGE__/${PACKAGE}/g"
|
@ -1,6 +1,6 @@
|
||||
util = require('util')
|
||||
util = require 'util'
|
||||
exec = require('child_process').exec
|
||||
|
||||
path = require 'path'
|
||||
|
||||
exports['default example project is generated'] = (test) ->
|
||||
test.expect 1
|
||||
@ -8,3 +8,14 @@ exports['default example project is generated'] = (test) ->
|
||||
test.ok true, "this assertion should pass" unless error?
|
||||
test.done()
|
||||
|
||||
exports['default example project has a ./.phonegap folder'] = (test) ->
|
||||
test.expect 1
|
||||
path.exists './example/.phonegap', (exists) ->
|
||||
test.ok exists, 'the phonegap folder exists'
|
||||
test.done()
|
||||
|
||||
exports['default example project has a /phonegap folder'] = (test) ->
|
||||
test.expect 1
|
||||
path.exists './example/phonegap', (exists) ->
|
||||
test.ok exists, 'the other phonegap folder exists'
|
||||
test.done()
|
||||
|
Loading…
Reference in New Issue
Block a user