Advertisement
Guest User

Untitled

a guest
Jan 31st, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.51 KB | None | 0 0
  1. # Step 1: Using Docker
  2.  
  3. See the [Docker readme](docker/README.md) file for setting up your local development environment.
  4.  
  5. # Step 2: Database Configs
  6.  
  7. ### Bolt
  8. Add this file:
  9.  
  10. `app/config/config_local.yml`:
  11.  
  12. ```
  13. database:
  14. driver: mysql
  15. username: local
  16. password: local
  17. databasename: DIG
  18. host: mysql # Uses Docker's DNS resolution to figure out the IP of the container
  19. debug: true
  20. environment: development
  21. base_url: http://dev.dignityofwar.com
  22. asset_url: http://dev.dignityofwar.com/theme/dig/assets
  23. ```
  24.  
  25. # Step 3: Run Phinx
  26.  
  27. IGNORE FOR NOW
  28.  
  29. <!--Phinx allows us to keep database changes in sync. Run the command:
  30.  
  31. `php vendor/bin/phinx migrate`
  32.  
  33. And it will keep all changes up to date.
  34.  
  35. Change the phinx.yml file to `default_database: development` and change the `development` section with your own environment's config.
  36.  
  37. Jenkins will inject the proper configs on production, so don't worry about them.
  38.  
  39. -->
  40.  
  41.  
  42. # Step 4: Setting up LESS compilation
  43.  
  44. ## LESS compilation
  45.  
  46. This project uses the LESS CSS Preprocessor language (http://lesscss.org) which adds various mathematical functions, variables, styling features etc to standard CSS. It also enables us to minify and compile all our LESS into a single file. We recommend you use Koala to process LESS, please see the Koala section below for instructions.
  47.  
  48. # Recommended Software
  49. ## Atom:
  50. Atom (https://atom.io/) is a very nice IDE with git project integration.
  51.  
  52. Recommended settings:
  53. - Editor => Tab Length: 4
  54. - Editor => Tab Type: Soft
  55.  
  56. Recommend the plugins:
  57. - linter
  58. - minimap
  59. - php-twig
  60. - tree-view-git-status
  61.  
  62. ## Koala
  63.  
  64. Koala (http://koala-app.com) is a very good LESS processor. Download it and set it up in the following fashion:
  65.  
  66. 1. Add the following project folder into Koala: `public/theme/dig/assets/less`
  67. 2. Koala will likely generate a bunch of files automatically in `public/theme/dig/assets/css`. Delete them all.
  68. 3. Remove all files from the list in Koala **except** `main.less`.
  69. 4. Right click on `main.less` and select `Set Output Path`
  70. 5. Navigate to `public/theme/dig/assets/css` and type the filepath `main.min.css` within that folder.
  71. 6. Click on the `main.less` file and checkbox the settings `Auto Compile`, `Source Map` and `Autoprefix`. Set `Output Style` to be **normal**.
  72. 7. Upon deployment to **DEVELOP** branch, you should change the `Output Style` to `Compressed` to save both Disk Space and Bandwidth for the end user. We keep it as `Normal` during development to prevent code conflicts (which will happen a LOT with CSS changes).
  73. 8. Finally, press `Compile`.
  74. 9. From now on, any changes made to the LESS files will be automatically compiled by Koala.
  75.  
  76. ### Adding a file to the compilation process
  77.  
  78. If you've created a new `.less` file, e.g. `pages/planetside2.less`, you need to add it to the `main.less` file in order for it to be compiled. In this example, add the following line to `main.less`:
  79.  
  80. ```
  81. @import 'pages/planetside2.less';
  82. ```
  83.  
  84. Any LESS files that aren't in a subdirectory can have the `.less` extension omitted. Only files in a subdirectory need the extension.
  85.  
  86. # Branching strategy
  87.  
  88. We're going to use the `feature` -> `develop` -> `staging` -> `master` strategy with DIG-website. Basically, `develop` will be where all of our development "master" code will go, which will also be the destinations of any Pull Requests.
  89.  
  90. Once we're happy to do a deployment, we'll merge `develop` into `staging`, run our tests, check browser compatability etc, and once we're fully happy, go live to `master`.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement