Creating a new App-tb2 based application
Ensure that you consistently name your app throughout the setup stages below, inconsistent naming will result in a compiler error.
- Connect to TFS and get latest to ensure you have up-to-date app files
- Duplicate the src/app-tb2 folder and rename it to your new src/app-name
- In the src/app-name/templates/default.dot.html file, replace references to 'app-tb2' with your app-name including the body id
- If the Corporate mega menu is not going to be used, open the src/app-name/templates/default.dot.html file and either
- remove the data-interchange attribute from the
<div id="menu">
or - change the data-interchange paths to pick up an alternative menu file in src/app-name/partials and amend them as needed for this application's navigation.
- remove the data-interchange attribute from the
- Edit src/app-name/config.rb to replace references to 'app-tb2' with your new app-name
- Edit src/app-name/partials/headelement.html to replace references to 'app-tb2' with your new app-name
- Edit src/app-name/Gruntfile.js to replace references to 'app-tb2' with your new app-name
- In the src/app-name/index.php file, replace references to 'app-tb2' with your app-name
- In the scss directory, duplicate the 'app-tb2.scss' file and 'app-tb2' folder and rename them with your new app-name
- In the production/img directory, create a new folder for your new app-name
- In the js directory, duplicate the 'app-tb2' folder and rename them with your new app-name
- In the js directory, open the 'app.js' file and rename all references of 'app-tb2' to your new 'app-name'
- As a final check, do a Find in location using 'cmd + shift + F' in Sublime to check that there are no longer any references to 'app-tb2' within the 'src' and 'scss' folders
- Open Terminal, change directory to your new application's src location and run
Grunt
to generate CSS and HTML. When changing directory simply entercd
and then click and drag the src/app-name/Trunk folder into terminal to save typing out the route