UNPKG

2.96 kBMarkdownView Raw
1Clay Command Line Tool
2========
3
4Command Line tool to build and Publish Web and Mobile Applications
5
6
7## What is clay
8
9Clay is used to publish pages, apps and content to the web fast and easy.
10
11Clay can also be used to build javascript/html5 apps with a streamlined process that takes advantage of gulp plugins.
12
13## How can I use Clay
14
15First setup your project, then use clay and gulp plugin to automate the most repetitive tasks while building apps and finally use Clay to upload the project to the web.
16
17## Creating an App
18After registering with Clay - create and app using `clay create APP_NAME` where APP_NAME is the name of your app.
19
20Once you are ready to `clay preview` your app - it will be available in APP_NAME.3votapp.com - where APP_NAME is the name of your app.
21
22Then from your domain - simply create a CNAME record that points to APP_NAME.3votapp.com. Once that's done you'll be able to run apps from http://smile.cocacola.com for example.
23
24## Gulp and Plugins
25Use project http://github.com/3vot/r3_demo to setup your new project.
26
27Gulp is optional and completely under developers control - in the end what Clay does is it gets the contents of the `dist` folder and uploads it.
28
29
30
31## Salesforce
32Clay is useful to build Salesforce Applications based in Visualforce - it contains a set of plugins to login, run a local server, upload visualforce pages and static resources.
33
34It operates the whole livecycle of the app from development to deployment - apps can be build like regular HTML5/Javascript apps and then published to Salesforce/Salesforce1 as Visualforce Pages.
35
36Use project http://github.com/3vot/vf_demo to setup your new project.
37
38## Commands
39
40### clay
41Runs the default Gulp task - is similar as running gulp.
42
43### clay preview
44Runs the `gulp dist` task if it exists and then uploads the contents of the `dist` folder into APP_NAME_stage.3votapp.com.
45
46The preview adds a _stage suffix to APP_NAME, this is done so we are able to have a staging sharable version.
47
48### clay publish
49Runs the `gulp dist` task if it exists and then uploads the contents of the `dist` folder into APP_NAME.3votapp.com.
50
51## Salesforce Commands
52
53Salesforce commands are similar - just add the salesforce keyword
54
55`clay salesforce` - starts local development server
56
57`clay salesforce publish` - published contents of `dist` folder as visualforce page + static resources
58
59
60## Gulp Tasks
61To run a gulp task from Clay - simply type the task name after clay. `clay images` - just make sure the task's name is not salesforce, preview or publish.
62
63## .env file
64Every project needs to have a .env file - this file contains project specific information. Here is an example:
65```
66```
67
68Make sure to add the `.env` file entry to `.gitignore` file on the projects root.
69
70## .env file for Salesforce
71When used in Salesforce the .env file also requires the options SF_USERNAME, SF_PASSWORD AND SF_HOST. SF_PASSWORD may include the security token right after the password.
72
73