Spaces Design
Setup
Note: If you're inside a corporate firewall that disallows git:// URLs, see the notes below to resolve the issue, otherwise tools like bower will fail.
- Sync
//photoshop/workarea/playground/...to your development machine. - Download and install
bower. - Clone this repo:
git clone https://github.com/adobe-photoshop/spaces-design.git. - Copy the fonts from
//photoshop/workarea/playground/plugins/playground/www/src/font/intosrc/font/(see README insrc/font/for more details). - In the root of your
spaces-designrepo, runbower install.
Next, do the following if you want to run the linter or tests from the command line. If you're a dev, this is nonoptional:
- Download and install Node.
- Install grunt-cli using NPM:
npm install -g grunt-cli. - In the root of your
spaces-designrepo, runnpm install.
Development
Once setup is complete:
- Build the Photoshop application
- (Currently) Build the platform-appropriate project in
//photoshop/workarea/playground/plugins/spaces - From a command line,
cdto the Perforce//photoshop/workarea/playgrounddirectory - Run
./plugins/spaces/tools/osx_build_and_go.sh. You should only have to call this when CEF changes (or e.g., after a sync from main). - Launch
spaces's Photoshop. - In Photoshop's preferences: Experimental Features. Enable Designshop.
- Relaunch Photoshop.
- After reboot there should be an iconic
->Dsbutton at the bottom of the Photoshop tool bar panel. Click it. - Congratulations, you're in Spaces.
File->Newshould get you a default document, and you're on your way.- Photoshop should launch directly into Designshop hereafter.
- In a browser window, visit http://localhost:9234/ to see inspector tools for the Spaces browser instance's contents.
Directories
Dependencies:
- Modules managed by
bowerwill be inbower_components. - Modules managed by
npmwill be innode_modules.
Sources:
- Put JavaScript files in
src/js/.- UI code is in
src/js/jsx.Main.jsxis the top-level UI file.
- UI code is in
- Put CSS (Less) files in
src/style/. - Put images in
src/img/.
Testing:
- Add tests to modules in
test/specs/.- Update the specs classes in
test/specs.jsaccordingly.
- Update the specs classes in
Compilation
Note: If you're developing, you probably don't want to perform a compilation step. A compiled version disables a lot of logging and profiling and such.
To produce an optimized build, in the root of your spaces-design repo run grunt build. The resulting files are generated in the build/ subdirectory, including concatenated and minified JavaScript files, and a CSS file compiled from the LESS source files.
Documentation
Coding Conventions
All code must follow the coding conventions, and must pass JSHint and JSCS.
JSHint and JSCS can be run on all JavaScript source in the project by running grunt test.
Notes
git/bower behind firewalls
To make bower work in places where git:// URLs don't work (e.g. inside a corporate firewall), run this git command:
git config --global url."https://".insteadOf git://To undo that after you've quit your job at a large corporate institution, run:
git config --global --unset url."https://".insteadOfGithub authentication without SSH
A side effect of using git over HTTPS instead of SSH (as with git:// URLS) is that, by default, you will be asked to enter your Github password before every command that requires authentication. Luckily, git can be configured to cache your credentials in memory, as described here.
LICENSE
(MIT License)
Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please see the LICENSE file at the root of the repository for licensing details on third-party code
Third-Party Code
A list of third-party code used by this project is available at https://github.com/adobe-photoshop/spaces-design/wiki/Third-party-code