tested on Photoshop CS3, CS4 and CS5
Photoshop bootstrap
Create your own predefined set of layers, layergroups and guides so you won't have to manually set these up every time you need a new psd.
Install
copy build/bootstrap.jsx
to your photoshop scripts folder:
Windows: C:\Program Files\Adobe\Adobe Photoshop CS5\Presets\Scripts
Mac OS: Applications\Adobe Photoshop CS5\Presets\Scripts
If you have copied the .jsx file to the right directory, the script should appear in Photoshop under file › scripts › bootstrap
when you have restarted it. It might be nice to create a shortcut.
Example
Usage
Edit the settings object at the top of the bootstrap.jsx to meet your own needs. Default setup creates a document of 1200x1200, with guides that center 978px horizontally and one vertical guide at 100px. Also a couple of layergroups are created, namely HEADER, BODY, FOOTER, and an extra layergroup + layer for the logo.
var height, margin, settings, width;
width = 1200;
height = 1200;
margin = (width - 978) / 2;
settings = {
/*
document setup
*/
width: width,
height: height,
/*
guides
*/
guides: {
horizontal: [100],
vertical: [margin, width - margin]
},
/*
layers
*/
layers: [
{
name: 'HEADER',
layers: [
{
name: 'logo',
layers: [
{
name: 'logo'
}
]
}
]
}, {
name: 'BODY',
layers: []
}, {
name: 'FOOTER',
layers: []
}, {
name: 'BACKGROUND',
layers: [
{
name: 'background'
}
]
}
]
};
name | type | example |
---|---|---|
width | number | 1200 |
height | number | 1200 |
guides | object | { horizontal: [], vertical: [] } |
guides.horizontal | array |
[100, 100*2, width / 2]
|
Contribute / modify
You must have node, npm, coffeescript and grunt installed.
Install node modules
Run npm link
to create a local install of the grunt packages.
Edit code
Run grunt
to continually compile coffeescript and move the .jsx file to the photoshop directory. Set the proper directory in the grunt.js file.