Full support for workspaces was added in Profound.js 5.0.0.
What is a Workspace?
A workspace is a convenient way of organizing your projects. A workspace is a directory on the file system that includes all of the source code and configuration files needed to make an application work, along with a Git repository for source control. Workspace directories are stored within the 'modules' sub-directory of the Profound.js installation directory. Workspaces from Profound.js can easily be deployed in the cloud on Profound.js Spaces and vice-versa. Use of workspaces in Profound.js is optional, but strongly encouraged. On Profound.js Spaces, all applications are organized into workspaces.
Creating a Workspace
To create a new workspace, use the option New→Workspace from the Home section of the ribbon:
Then enter a workspace name and description on the Create Workspace dialog:
The workspace is created and then automatically opened in the IDE.
Workspace Directory Structure
A workspace has the following directory structure. Note that you'll need to select Show Hidden in order to show all of the contents.
- Application source code files can go into the main workspace directory, or into sub-directories that you create. This example shows a new/empty workspace – there are no source code files yet.
- The '.git' directory contains the Git source control repository.
- The '.gitignore' file contains a list of files and directories to be ignored by Git. This is useful when your project contains files that you don't want to commit to source control, such as dependencies from NPM (node_modules), etc.
- The '.noderun' directory contains the workspace settings, which are stored in JSON files.
- The 'public' directory is where you can place static files that are designed to be served via HTTP, such as images, style sheets, client-side JavaScript files, etc.
- The 'README.md' file is a Markdown file that you can use to show a description of your project.
Adding Source Files
Source files can be added to the workspace by using the right-click option on the Files Tree:
Or by using the New File drop down options on the ribbon:
And then saving the file into the workspace directory or a sub-directory, by clicking the Save button in the ribbon:
When a workspace is open in the IDE, the default save location will be the workspace directory: