In this section you can find the tutorial for creating projects with RAIN SDK. Please read Installing RAIN before this.
RAIN gives the developer two commands:
Below you can find a bunch of useful commands to use:
rain --help raind --help Usage: rain <command> <options> raind <options>
You can easily use RAIN SDK to create projects and components. To create a new project execute the following commands:
Now you have your first RAIN project. Try the following url in your browser: http://localhost:1337/hello_world/index.
RAIN provides a debug mode for the server-side. You only have to start the server with –debug. It automatically connects the Node native debugger with the port 5858.
If you want to use a graphical debugger then you can install the “node-inspector” NPM module.
sudo npm install node-inspector -g
npm install node-inspector -g
Now start the node-inspector in the command line with node-inspector and you can access the debugger with http://localhost:8080.
The RAIN SDK provides a method to generate localization files by parsing the sources for the components, and generating .po for the specified locale through the rain generate-po-files command.
This command parses the translation ids used inside components and generates apropriate .po files inside the components locale folders that can be later translated.
$ rain generate-po-files <output-locales> [component-id]
# generate en_GB and de_DE po files for all components $ rain generate-po-files "en_GB,de_DE" # generate en_GB .po files for the example component, version 1.0 $ rain generate-po-files "en_GB" "example;1.0"
The rain SDK provides a method to generate a minified RAIN project.
All the js and css files from the client folder of components will be minified into an index.min.js/index.min.css file.
The new minified project is generated at the path specified in the build.json file that can look like this:
If the buildPath key is missing then all the minified files will be generated in the current project, in each component folder.
The themes key specifies the current css themes used in the project and their folder name.
A detailed description of this process can be found in the RAIN Minification Process page.