README.md 1.7 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Raw
  2. Place this app in **nextcloud/apps/**
  3. ## Building the app
  4. The app can be built by using the provided Makefile by running:
  5. make
  6. This requires the following things to be present:
  7. * make
  8. * which
  9. * tar: for building the archive
  10. * curl: used if phpunit and composer are not installed to fetch them from the web
  11. * npm: for building and testing everything JS, only required if a package.json is placed inside the **js/** folder
  12. The make command will install or update Composer dependencies if a composer.json is present and also **npm run build** if a package.json is present in the **js/** folder. The npm **build** script should use local paths for build systems and package managers, so people that simply want to build the app won't need to install npm libraries globally, e.g.:
  13. **package.json**:
  14. ```json
  15. "scripts": {
  16. "test": "node node_modules/gulp-cli/bin/gulp.js karma",
  17. "prebuild": "npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update",
  18. "build": "node node_modules/gulp-cli/bin/gulp.js"
  19. }
  20. ```
  21. ## Publish to App Store
  22. First get an account for the [App Store](http://apps.nextcloud.com/) then run:
  23. make && make appstore
  24. The archive is located in build/artifacts/appstore and can then be uploaded to the App Store.
  25. ## Running tests
  26. You can use the provided Makefile to run all tests by using:
  27. make test
  28. This will run the PHP unit and integration tests and if a package.json is present in the **js/** folder will execute **npm run test**
  29. Of course you can also install [PHPUnit](http://phpunit.de/getting-started.html) and use the configurations directly:
  30. phpunit -c phpunit.xml
  31. or:
  32. phpunit -c phpunit.integration.xml
  33. for integration tests