The purpose of the Centrally Deployed Templates Solution (CDTS) is essentially to deliver the presentation layer of the Canada.ca or intranet.canada.ca themes to web assets. It decouples the presentation layer from the business logic of a static website or web application and allows rapid updates across multiple networks.
Please visit our documentation for more information about the project.
To work with this project you will need node.js and npm installed. This project was created with:
- node.js v12.14.0
- npm 6.13.4
- java version "1.8.0_201"
- Java(TM) SE Runtime Environment (build 1.8.0_201-b26)
For ESDC employees Please read ESDC Proxy Scripts if it's your first time connecting to github from your work computer.
Please see SECURITY.md for more information.
Clone this repository to a local directory. On the command line move to the cloned directory ( this directory should contain the package.json file) and run : $ npm install.
This command will read the package.json and install the npm dependencies to the node_modules directory.
The soy files are compiled with grunt-soy-compile.
This project uses the nodeJS and npm modules to get the dependencies needed, build, minify and deploy the final JavaScript modules.
To create a development build of the modules on the command line move to the cloned directory and run: $ npm run build
This command will:
- Empty the
distandtmpfolder - Compile the soy files using grunt-soy-compile into the
tmpfolder - Copy and rename and concat the compiled
jsfiles into thedist - Copy the
gcwebandwet-boewfiles from thenode_modulesfolder in thedist - Copy all the other assets (JS, CSS, HTML) files from the
_srcin thedist/cdtsfolder - Delete the
tmpfolder
- Setup git submodules for sample pages, added issue #7
- Use a CI to tests source code, added issue #8
- Use CI to deploy
distfolder to servers, added issue #9
Used to host the dist folder to be able to pull to different servers. Travis.CI is used to build and then deploy to these secondary repositories within the coffee scripts. Will create a branch with the curent version number. And tags for releases.
Not sure what this is for but WET has it. Might get rid of it, might keep it. WET uses to host all their working files.
Holds all the releases so that servers can pull from this repository onto the CDNs.
Default task that runs the core unminified build
Produces the production files, which is build + minify
Run full build.
Minify built files.
Build and deploy artifacts to cdts-sgdc-cdn (Only works on Travis-ci.org)
- Sass or post-css
- Something to generate the sample HTML files (jekyll)
We would like to setup a new DNS new path for the CDTS JS files.
Looking at maybe one of these:
- sgdc-cdts.canada.ca/v1.0.1/cdts/js/gcweb-en.js
- cdts.canada.ca/v1.0.1/cdts/js/gcweb-en.js
- sgdc.canada.ca/v1.0.1/cdts/js/gcweb-en.js
Unless otherwise noted, the source code of this project is covered under Crown Copyright, Government of Canada, and is distributed under the MIT License.
The Canada wordmark and related graphics associated with this distribution are protected under trademark law and copyright law. No permission is granted to use them outside the parameters of the Government of Canada's corporate identity program. For more information, see Federal identity requirements.