A CNSC proof-of-concept implementation of the Government of Canada (GC) Web Usability theme for the Web Experience Toolkit
To get started make sure you have Admin rights on your machine and follow these three important steps:
- Install the prerequistites
- Clone this repo
- Run the setup script
Each step is detailed below.
You must have the following installed on your system to make this project work:
- Git
- NodeJS
- Python 2.7
- C++ runtime
The easiest way to install them is by using the Visual Studio installer.
If you do not have a recent version of Visual Studio. You can get the community edition from: https://visualstudio.microsoft.com/vs/
During the install phase for Visual Studio make sure to select:
- Git
- Node
- Python 2.7
- C++ Desktop Development
If you already have Visual Studio installed, follow the instructions below.
- Navigate to Control Panel
- Go to Programs
- Click on Programs and Features
- Find Microsoft Visual Studio in the list of programs.
- Right click on Microsoft Visual Studio
- Select Change
- Select Modify
- Choose the packages you want (Git, Node, Python, C++)
- Select Next
After everything is installed. Reboot.
When your machine comes back make sure to add the NPM folder to your System's PATH.
- From the desktop, right-click My Computer and click Properties.
- In the System Properties window, click on the Advanced tab.
- In the Advanced section, click the Environment Variables button.
- in the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button. Make sure the following path appears at the end of the PATH string:
c:\Users\<username>\AppData\Roaming\npm;
Don't forget to replace <username>
with your actual Windows username.
Open a command prompy and run:
git -c http.sslVerify=false clone https://github.com/arcdev1/theme-cnsc-fepoc.git
Alternatively, to start fresh, you can download the GCWU theme directly from: https://github.com/wet-boew/theme-gcwu-fegc/archive/v4.0.27.zip
At the command prompt, run the following commands:
npm config set strict-ssl false
npm config set registry="http://registry.npmjs.org/"
cd theme-cnsc-fepoc
cd script
setup
Note: Mac users should use sh setup
instead.
If you see errors relating to postinstall
run the following command from the project root /theme-cnsc-fepoc
npm run postinstall
Note: Every time you open a new Command Prompt, you will need to run the following to avoid SELF_SIGNED_CERT errors:
npm config set strict-ssl false
npm config set registry="http://registry.npmjs.org/"
From the project's root folder /theme-cnsc-fepoc
run the following command:
grunt
Install httpster
with the following command:
npm i -g httpster
Then from the site root:
cd dist
httpster
To enable editing .hbs
files in Dreamweaver Design view you need to add
the HBS extension as an HTML type to the Extensions.txt
file and to the
MMDocumentTypes.xml
file.
Follow these instructions from Adobe for how to find and edit these files.
Here's a snippet from a modified Extensions.txt
HBS,HTM,HTML,SHTM,SHTML,XHTML,STM,SSI,JS,JSON,APPCACHE,XML,XSL,XSD,DTD,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX,ASMX,CONFIG,CS,CSS,SCSS,LESS,SASS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,PHP-DIST,PHTML,TPL,VB,INC,SQL,MASTER,SVG:All Documents
HBS,HTM,HTML,HTA,HTC,XHTML:HTML Documents
Here's a snippet from a modified MMDocumentTypes.xml
<documenttype id="HTML" internaltype="HTML" winfileextension="hbs,html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileextension="hbs,html,htm,shtml,shtm,tpl,lasso,xhtml,ssi" file="Default.html" writebyteordermark="false" mimetype="text/html">
Note the addition of HBS
and hbs