Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

joshfire/factory-template-sleek

Repository files navigation

Sleek - template for the Joshfire Factory

Default template for the Joshfire Factory. Supports all existing datasources and all existing platforms.

The repository includes:

  • the raw source code of the template for development purpose
  • builds of the source code for the different supported platforms

Built code needs to be in the repo because the Factory has no notion of template compilation and simply gathers the code to include from the repo. A possible alternative would be to maintain two repos, one for the source code and one for the builds, but that sounds a bit heavy.

Note the Factory ignores files listed in .gitattributes when it clones the repo. This explains why this file lists the folders and files that become useless when the template is built.

Development

Codebase

The core of the app sits in the app folder. There is one entry point per family of devices (phone, tablet, desktop, tv) and one entry point for Samsung Smart TV. Each entry-point exists in raw form (e.g. index.phone.html) and in built form (e.g. index.phone.optimized.html).

Sleek uses the Joshfire Framework, referenced as a git submodule:

git submodule init
git submodule update

All styles are defined using LESS. The .optimized files are built files and can safely be ignored during development. Changes made to the raw source code and changes made to built files should be committed separately.

Most builds of Sleek are in the app folder as well. The build folder contains the Samsung Smart TV build of Sleek, separated from the rest of the code because the TV is sensitive to the amount of code shipped in the deployed app.

Run Sleek

The entry points reference a bootstrap file generated by the Factory. That link may need to be adjusted to suit your needs.

To run the template, simply open the entry point in a Web browser. You may need to run a local HTTP server to serve the files in a Web browser to overcome restrictions on the file scheme. Note the .optimized entry points do not work from the app folder. They are copied over to the build folder during compilation. Also, the Samsung Smart TV entry point will report errors in a Web browser because it attempts to load Samsung SDK libraries that do not exist outside of the realm of the TV.

To test builds, open the index.html files in the build folder.

Build Sleek

Pre-requisites

You will need to install Jake to compile CSS styles from LESS files:

cd tasks
npm install

Build Sleek

The build.sh script, located in the root folder, builds Sleek from scratch. This may take about two minutes (due to the use of Woodman's precompiler to remove traces of Woodman from the compiled code).

Compile CSS styles

If you only want to update the CSS styles after modifications of the LESS files, run:

cd tasks
node_modules/.bin/jake compile:less

Note that step is included in the build, no need to compile CSS styles on your own when you want to build a new version of Sleek

How to release a new version of Sleek

To release a new version of Sleek:

  1. Increment the version number in package.json
  2. Run ./build.sh to build Sleek
  3. Test resulting builds in the browser. In particular, if you added resources such as images or additional external libraries, the build script may have missed them.
  4. git add, git commit and git push the code that was built. It is good practice to include the version number in the commit message.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published