This repository contains the website files for hosting the Subterfuge: Community Edition website. All of the files in this repository generate the website that is visible on the live subterfuge website. This website is used for advertising the game, providing a dev-log, and also provides some user interaction, for example, allowing users to view account details, and also allows administrators to view and access administrative controls and server information.
Setting up with docker is the easiest way to get started.
- If not installed, install Docker for your operating system.
- Start the container with
docker-compose up -d
. (NOTE: If you are running for production, see info below.) - Access the website at
http://localhost
If you are deploying to a production environment, modify step 2:
docker-compose up -d -f Dockerfile.production
If you would prefer to not use docker, the environment can be setup locally.
- Install Node.js
- Clone this repository to the location of your choice.
- Install the javascript dependencies with
npm install
- Run the development server with
npm run dev
Once the container has started, it might be required for you to need to execute one of the scripts found in the package.json file.
In order to open the command line for the container, type docker-compose exec web /bin/ash
to open the command line.
Once you are in the container, the following scripts are avaliable:
npm run dev
- This command is run automatically when the container is started. This will start the development server on port 80
of the container and enable hot reloading. This means that when changes within the files are made, the website is automatically updated.
npm run docs
- Generates the Vue component reference and hosts the component reference files on port 5000
. Once the command is executed you can view the component reference for Vue components. This documents all custom component props, slots, events, and more to provide a reference on how to use them.
npm run test
- Runs the automated tests on the components.
To exit the command line, exit with ctrl-Z
The following libraries have been installed. These links are references to the developer docs for each library so that you may make use of them.
Bootstrap-Vue - CSS famework Lodash - Utility library Moment - 100x easier dates Sass - Dynamic CSS styles Vue - The main javascript framework Vue-Awesome - Vue font-awesome icon library Vue-i18n - Internationalization/Translation package Vue-Router - Self explanitory for SPA Vuese - Automatic Vue component references Vuex - Vue state manager
Chai - Assertion library Istanbul - Test coverage tool Mocha - Test runner Sinon - Mocks/Fakes/Stubs