Update documentation to work without ncdev

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling
2016-10-17 16:32:11 +02:00
parent 928359050e
commit 7ff44108af
4 changed files with 15 additions and 23 deletions

View File

@@ -4,17 +4,11 @@ Create an app
.. sectionauthor:: Bernhard Posselt <dev@bernhard-posselt.com>
After :doc:`you've set up the development environment and installed the dev tool <../general/devenv>` change into the Nextcloud apps directory::
After :doc:`you've set up the development environment <../general/devenv>` change into the Nextcloud apps directory::
cd /var/www/nextcloud/apps
Then run::
ncdev startapp MyApp --email mail@example.com --author "Your Name" --description "My first app" --owncloud 8
This will create all the needed files in the current directory. For more information on how to customize the generated app, see the `Project's GitHub page <https://github.com/nexcloud/ncdev>`_ or run::
ncdev startapp -h
Then create a skeleton app in the `app store <https://apps.nextcloud.com/developer/apps/generate>`_.
Enable the app
--------------
@@ -27,7 +21,6 @@ The following directories have now been created:
* **appinfo/**: Contains app metadata and configuration
* **css/**: Contains the CSS
* **js/**: Contains the JavaScript files
* **lib/Controller/**: Contains the controllers
* **lib/**: Contains the other class files of your app
* **lib/**: Contains the php class files of your app
* **templates/**: Contains the templates
* **tests/**: Contains the tests

View File

@@ -10,7 +10,7 @@ All PHP classes can be tested with `PHPUnit <http://phpunit.de/>`_, JavaScript c
PHP
===
The PHP tests go into the **tests/** directory. Unfortunately the classloader in core requires a running server (as in fully configured and setup up with a database connection). This is unfortunately too complicated and slow so a separate classloader has to be provided. If the app has been generated with the **ncdev startapp** command, the classloader is already present in the the **tests/** directory and PHPUnit can be run with::
The PHP tests go into the **tests/** directory and PHPUnit can be run with::
phpunit tests/

View File

@@ -9,11 +9,13 @@ This tutorial will outline how to create a very simple notes app. The finished a
Setup
=====
After the `development tool <https://github.com/nextcloud/ncdev/blob/master/README.rst#installation>`_ has been installed the :doc:`development environment needs to be set up <../general/devenv>`. This can be done by either `downloading the zip from the website <https://nextcloud.com/install/>`_ or cloning it directly from GitHub::
First the :doc:`development environment <../general/devenv>` needs to be set up. This can be done by either `downloading the zip from the website <https://nextcloud.com/install/>`_ or cloning it directly from GitHub::
ncdev setup core --dir nextcloud --branch $BRANCH
git clone git@github.com:nextcloud/server.git --branch $BRANCH
git submodule init
git submodule update
.. note:: $BRANCH is the desired Nextcloud branch (e.g. stable9 for Nextcloud 9, stable10 for Nextcloud 10, etc)
.. note:: ``$BRANCH`` is the desired Nextcloud branch (e.g. ``stable9`` for Nextcloud 9, ``stable10`` for Nextcloud 10, ..., ``master`` for the upcoming release)
First you want to enable debug mode to get proper error messages. To do that set ``debug`` to ``true`` in the **nextcloud/config/config.php** file::
@@ -30,14 +32,11 @@ Now open another terminal window and start the development server::
cd nextcloud
php -S localhost:8080
Afterwards the app can be created in the **apps** folder::
Afterwards a skeleton app can be created in the `app store <https://apps.nextcloud.com/developer/apps/generate>`_.
cd apps
ncdev startapp OwnNotes
Download the extracted the downloaded file and move it into your ``apps/`` directory. Afterwards the application can be disabled on the `apps page <http://localhost:8080/index.php/settings/apps>`_.
This creates a new folder called **ownnotes**. Now access and set up Nextcloud through the webinterface at `http://localhost:8080 <http://localhost:8080>`_ and enable the OwnNotes application on the `apps page <http://localhost:8080/index.php/settings/apps>`_.
The first basic app is now available at `http://localhost:8080/index.php/apps/ownnotes/ <http://localhost:8080/index.php/apps/ownnotes/>`_
The first basic app is now available at ``http://localhost:8080/index.php/apps/yourappid/``
Routes & Controllers
====================

View File

@@ -48,15 +48,15 @@ Check out the code
The following commands are using **/var/www** as the Web server's directory and **www-data** as user name and group.
Install the `development tool <https://github.com/nextcloud/ncdev>`_
After the development tool installation make the directory writable::
sudo chmod o+rw /var/www
Then install Nextcloud from git::
ncdev setup --dir /var/www/<folder> server
git clone git@github.com:nextcloud/server.git --branch $BRANCH /var/www/<folder>
git submodule init
git submodule update
where <folder> is the folder where you want to install Nextcloud.