Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Step 1: Using Docker
- See the [Docker readme](docker/README.md) file for setting up your local development environment.
- # Step 2: Database Configs
- ### Bolt
- Add this file:
- `app/config/config_local.yml`:
- ```
- database:
- driver: mysql
- username: local
- password: local
- databasename: DIG
- host: mysql # Uses Docker's DNS resolution to figure out the IP of the container
- debug: true
- environment: development
- base_url: http://dev.dignityofwar.com
- asset_url: http://dev.dignityofwar.com/theme/dig/assets
- ```
- # Step 3: Run Phinx
- IGNORE FOR NOW
- <!--Phinx allows us to keep database changes in sync. Run the command:
- `php vendor/bin/phinx migrate`
- And it will keep all changes up to date.
- Change the phinx.yml file to `default_database: development` and change the `development` section with your own environment's config.
- Jenkins will inject the proper configs on production, so don't worry about them.
- -->
- # Step 4: Setting up LESS compilation
- ## LESS compilation
- 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.
- # Recommended Software
- ## Atom:
- Atom (https://atom.io/) is a very nice IDE with git project integration.
- Recommended settings:
- - Editor => Tab Length: 4
- - Editor => Tab Type: Soft
- Recommend the plugins:
- - linter
- - minimap
- - php-twig
- - tree-view-git-status
- ## Koala
- Koala (http://koala-app.com) is a very good LESS processor. Download it and set it up in the following fashion:
- 1. Add the following project folder into Koala: `public/theme/dig/assets/less`
- 2. Koala will likely generate a bunch of files automatically in `public/theme/dig/assets/css`. Delete them all.
- 3. Remove all files from the list in Koala **except** `main.less`.
- 4. Right click on `main.less` and select `Set Output Path`
- 5. Navigate to `public/theme/dig/assets/css` and type the filepath `main.min.css` within that folder.
- 6. Click on the `main.less` file and checkbox the settings `Auto Compile`, `Source Map` and `Autoprefix`. Set `Output Style` to be **normal**.
- 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).
- 8. Finally, press `Compile`.
- 9. From now on, any changes made to the LESS files will be automatically compiled by Koala.
- ### Adding a file to the compilation process
- 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`:
- ```
- @import 'pages/planetside2.less';
- ```
- Any LESS files that aren't in a subdirectory can have the `.less` extension omitted. Only files in a subdirectory need the extension.
- # Branching strategy
- 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.
- 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