boulevardier-schematic v0.0.3
boulevardier-schematic
This repository is an Angular Schematic implementation to generate a Boulevardier site from TEI sources.
Using this schematic
Dependencies
Using this schematic requires that the following tools be installed:
- nodejs
- npm
Once npm is installed, install the Angular CLI tools and this schematic:
- npm install -g angular-cli
- npm install -g boulevardier-schematic
Additional dependencies required for the site will be installed within the project according to its requirements.
Preparing content
This generator currently assumes that your site's static content -- including any TEI articles, images, icons, and ancillary pages -- is available to the schematic with the following layout on the filesystem:
~/dev/my-boulevardier-assets/ $ tree
.
├── articles # TEI-encoded primary site content
│ ├── TEI.1.xml
│ ├── ...
│ └── TEI.n.xml
├── config
│ └── map.json # configuration values for the map and tiles
├── fonts
│ ├── font.1.css # CSS fonts to use for the site
│ ├── ...
│ └── font.n.css
├── icons # map marker icons to use for the site
│ ├── icon.1.svg
│ ├── ...
│ └── icon.n.svg
├── images # images referenced in TEI articles
│ ├── image.1.jpg
│ ├── ...
│ └── image.n.jpg
├── pages # ancillary HTML pages
│ ├── page.1.html
│ ├── ...
│ └── page.n.html
└── title # HTML content for the title page
└── title.html
Generating a new site
The following commands cause a new Angular 6 site to be generated. The directory my-boulevardier-assets
contains content as described in the preceding section.
~/dev/ $ ng new my-site
~/dev/ $ cd my-site
~/dev/my-site $ schematics boulevardier-schematic:application --assetsDirectory=../my-boulevardier-assets --dry-run=false --force
~/dev/my-site $ ng build
~/dev/my-site $ ng serve
~/dev/my-site $ # site now availbale at http://localhost:4200
Version control
The generated site includes an initialized git repo, but most of the custom content is not yet included. Run the following commands to put the site under version control:
~/dev/my-site $ git add -A
~/dev/my-site $ git commit . -m "<your comment>"
Note that there is a .gitignore file included during the ng new ...
step.
TODO: add task to automate this step.