Skip to content

Commit a1d941b

Browse files
Slava Vpavelthq
Slava V
authored andcommitted
Resolve VC-171 "Update contributing related files"
1 parent 4e3fa6b commit a1d941b

File tree

4 files changed

+137
-124
lines changed

4 files changed

+137
-124
lines changed

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
58+
reported by contacting the project team at [[email protected]](mailto:[email protected]). All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.

CONTRIBUTING.md

+119-40
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,36 @@
11
# Contributing to Visual Composer Website Builder
2+
You can contribute and help make Visual Composer better. Follow the guidelines:
3+
- [Code of Conduct](#code-of-conduct)
4+
- [Submission Guidelines](#submission-guidelines)
5+
- [Coding Rules](#coding-rules)
6+
- [Installation instruction](#installation-instruction)
27

3-
## Branch Organization
4-
We will do our best to keep the **master** branch in good shape, with tests passing at all times.
8+
## Code of Conduct
9+
Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md).
510

6-
If you send a pull request, please do it against the master branch. We maintain stable branches for major versions separately but we don’t accept pull requests to them directly. Instead, we cherry-pick non-breaking changes from master to the latest stable major version.
11+
## Submission Guidelines
712

8-
## Semantic Versioning
9-
Visual Composer follows semantic versioning. We release patch versions for bugfixes, minor versions for new features, and major versions for any breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance.
13+
### Forking workflow
14+
Keep the `master` branch tests passing at all times.
1015

11-
Every significant change is documented in the changelog file.
16+
If you send a pull request, please do it against the master branch. We maintain stable branches for major versions separately (Example: `12.x`). Instead of accepting pull requests to the version branches directly, we cherry-pick non-breaking changes from `master` to the version.
1217

13-
14-
## From Mainline to Forking workflow
15-
16-
Make fork for of VCWB repo in Gitlab.
17-
18-
To setup repo with SSH from the scratch
19-
20-
Go to your active Wordpress wp-plugin directory
18+
Make fork for of VCWB repo in GitHub. Go to your active WordPress `wp-content/plugins` directory.
2119

2220
```sh
23-
$ git clone git@gitlab.com:<Username>/builder.git
21+
$ git clone git@github.com:<Username>/builder.git
2422
$ cd builder
25-
$ git remote add upstream git@gitlab.com:visual-composer-website-builder/builder.git
23+
$ git remote add upstream git@gihub.com:Visualcomposer/builder.git
2624
$ git remote set-url --push upstream no_push
2725
$ git remote -v
28-
origin [email protected]:<Username>/builder.git (fetch)
29-
origin [email protected]:<Username>/builder.git (push)
30-
upstream [email protected]:visual-composer-website-builder/builder.git (fetch)
31-
upstream no_push (push)
32-
```
33-
34-
If you already have repo just follow the instructions
35-
36-
```sh
37-
$ git remote rename origin upstream
38-
$ git remote add origin [email protected]:<Username>/builder.git
39-
$ git push -u origin master
40-
$ git remote set-url --push upstream no_push
41-
$ git remote -v
42-
origin [email protected]:<Username>/builder.git (fetch)
43-
origin [email protected]:<Username>/builder.git (push)
44-
upstream [email protected]:visual-composer-website-builder/builder.git (fetch)
26+
origin [email protected]:<Username>/builder.git (fetch)
27+
origin [email protected]:<Username>/builder.git (push)
28+
upstream [email protected]:Visualcomposer/builder.git (fetch)
4529
upstream no_push (push)
4630
```
4731

4832
### Creating features
49-
50-
Use Feature Branch workflow
51-
52-
If you want to send you data to upstream you need to create merge request in Gitlab
33+
Use [Feature Branch workflow](https://es.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow). If you want to send you data to upstream you need to [create pull request in GitHub](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork).
5334

5435
```sh
5536
$ git checkout -b <VC-ID-feature-branch-in-kebab-case>
@@ -59,15 +40,113 @@ $ git push -u origin <feature-branch-in-kebab-case>
5940
```
6041

6142
### Bring builder up to date
62-
6343
```sh
6444
$ git checkout master && git pull upstream master # checkout
6545
$ git push
6646
```
6747

68-
### Cleanup after Merge request
69-
48+
### Cleanup after pull request
7049
```sh
7150
$ git branch -d <branch name>
7251
$ git push origin master
7352
```
53+
54+
## Coding Rules
55+
56+
### Javascript
57+
58+
#### Code Style
59+
Use StandardJS to validate code-style `yarn standard`.
60+
61+
#### Supported Language
62+
Use ES6 version for Javascript code. https://standardjs.com
63+
64+
#### Variables and Classes
65+
For all var, let, const and method names you should use camelCase.
66+
67+
Exceptions to the rule:
68+
* Class names for ES6 with camelCase and first Uppercase letter.
69+
* Constructors for ES5 with camelCase and first Uppercase letter.
70+
71+
#### No jQuery
72+
Contributor should try not to use jQuery and jQuery-like libraries.
73+
74+
## Installation instruction
75+
All javascript is build with webpack module builder. Install the plugin and checked that it works, you can make changes to it to get acquainted with the code.
76+
77+
### Requirements
78+
* PHP >= 5.4
79+
* WordPress >= 4.6
80+
* PHP `gd2/imagick` extension to be loaded
81+
* Node >=8.0
82+
* npm >=5.8
83+
* yarn
84+
85+
Locate plugin folder in your WordPress installation under `wp-content/plugins` and clone builder repo here.
86+
87+
##### 1. Install node modules and php composer dependencies
88+
``` sh
89+
$ yarn install
90+
$ php ci/composer.phar update
91+
```
92+
93+
##### 2. Build project
94+
```sh
95+
$ yarn build
96+
# watch
97+
$ yarn watch
98+
```
99+
##### 3. Build settings (Welcome page, Activation page)
100+
```sh
101+
$ yarn build-settings
102+
# watch
103+
$ yarn watch-settings
104+
```
105+
106+
##### 4. Build elements
107+
```sh
108+
$ bash tools/elements/buildScript.sh
109+
# or production version
110+
$ bash tools/elements/buildProductionScript.sh
111+
```
112+
You can build each element separately.
113+
```sh
114+
$ cd elements/{elementDirectory}
115+
$ ../../node_modules/.bin/webpack --config webpack.config.4x.babel.js --progress --colors
116+
# compile style.css and watch
117+
$ ../../node_modules/.bin/webpack --config webpack.config.4x.babel.js --progress --colors --watch /public/src/init.less styles.css --autoprefix="last 2 versions"
118+
```
119+
You need to build public assets for element if exist.
120+
```sh
121+
$ cd elements/{elementDirectory}/{elementDirectory}/public
122+
# build
123+
$ ../../../../node_modules/.bin/webpack --config=webpack.config.js -p
124+
# watch
125+
$ ../../../../node_modules/.bin/webpack --config=webpack.config.js -p --watch
126+
```
127+
128+
##### Build assets
129+
```sh
130+
$ cd public/sources/assetsLibrary/{assetDirectory}
131+
$ ../../../../node_modules/.bin/webpack --config=webpack.config.babel.js -p
132+
```
133+
134+
##### Install local githooks
135+
Git hooks will add pre-commit hooks to keep commits clean.
136+
```sh
137+
$ cd _infrastructure
138+
$ ./install-hooks
139+
```
140+
141+
##### Debug mode
142+
You can enable debug mode by adding `env-dev.php` file to the root directory of the project.
143+
```php
144+
<?php
145+
146+
if (!VcvEnv::has('VCV_DEBUG')) {
147+
VcvEnv::set('VCV_DEBUG', true);
148+
}
149+
require_once "env.php";
150+
```
151+
152+

README.md

+12-77
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,19 @@
11
# Visual Composer Website Builder
2+
Visual Composer Website Builder is a drag and drop editor for WordPress. With an easy-to-use interface, it allows you to design layouts you always wanted. Coupled with premium templates, blocks, elements, and extensions - Visual Composer is all you need to create a website.
23

3-
[![build status](https://gitlab.com/visual-composer-website-builder/builder/badges/master/build.svg)](https://gitlab.com/visual-composer-website-builder/builder/commits/master)
4-
[![coverage report](https://gitlab.com/visual-composer-website-builder/builder/badges/master/coverage.svg)](https://gitlab.com/visual-composer-website-builder/builder/commits/master)
4+
## Installation
5+
Read [Installation instruction](./CONTRIBUTING.md#installation-instruction) in our [contributing guide](./CONTRIBUTING.md).
56

7+
## Builder for Developers
8+
Visual Composer API allows you to develop your own custom elements for the website builder.
9+
[Get started](https://visualcomposer.com/help/api/)
610

7-
## Javascript Code Style
8-
* Use StandardJS to validate code-style `yarn standard`.
911

10-
## Supported Language
11-
Use ES6 version for Javascript code. https://standardjs.com
12+
## Changelog
13+
Check the [list of the latest improvements](./CHANGELOG.md).
1214

13-
## Variables and Classes
14-
For all var, let, const and method names you should use camelCase.
15-
Exceptions to the rule:
16-
* Class names for ES6 with camelCase and first Uppercase letter.
17-
* Constructors for ES5 with camelCase and first Uppercase letter.
15+
## Contributing
16+
Read our [contributing guide](./CONTRIBUTING.md) to learn about our development process. How to build your changes to Visual Composer.
1817

19-
## No jQuery
20-
Contributor should try not to use jQuery and jQuery-like libraries.
21-
22-
## Requirements
23-
* PHP > 5.4
24-
* WordPress > 4.6
25-
* PHP `gd2/imagick` extension to be loaded
26-
* Node
27-
* npm
28-
* `npm install -g yarn`
29-
30-
## Installation instruction
31-
All javascript is build with webpack module builder.
32-
33-
``` sh
34-
$ yarn install
35-
$ php ci/composer.phar update
36-
```
37-
### Environment Configuration in Javascript
38-
If you want to setup custom environment configuration settings,3 you can use *custom-variables.js* by c it from default-variables.js.
39-
40-
### Feature toggle and environment Configuration in Javascript
41-
To build a deliverable product use feature toggle to enable/disable some code features and fixes. Default state of feature toggle is set in *default-variables.js*.
42-
You can customize settings by creating copy of variables file *default-variables.js* with a git ignored filename *custom-variables.js*.
43-
44-
### Install local githooks
45-
```sh
46-
$ cd _infrastructure
47-
$ ./install-hooks
48-
```
49-
### Build project
50-
```sh
51-
$ yarn build
52-
```
53-
### Build settings (Welcome page, Activation page)
54-
```sh
55-
$ yarn build-settings
56-
```
57-
### Start watcher
58-
```sh
59-
$ yarn watch
60-
```
61-
62-
### Add elements ###
63-
```sh
64-
$ bash tools/elements/buildScript.sh
65-
## or production version
66-
$ bash tools/elements/buildProductionScript.sh
67-
```
68-
69-
### env-dev.php example
70-
```php
71-
<?php
72-
73-
if (!VcvEnv::has('VCV_DEBUG')) {
74-
VcvEnv::set('VCV_DEBUG', true);
75-
}
76-
require_once "env.php";
77-
```
78-
79-
## Build Wordpress plugin package (zip archive)
80-
```sh
81-
git clone account-project
82-
node [account-project]_infrastructure/vcwb-builder/builder plugin -p <directoryWhereToPlaceZipArchive>
83-
node [account-project]_infrastructure/vcwb-builder/builder plugin --help # for more info
84-
```
18+
## License
19+
Visual Composer is [GPL licensed](./license.txt).

package.json

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "vcwb",
3-
"version": "2.3.0-dev",
4-
"description": "VC Website Builder",
3+
"version": "dev",
4+
"description": "Visual Composer Website Builder",
55
"main": "index.php",
66
"repository": {
77
"type": "git",
8-
"url": "git@gitlab.com:visual-composer-website-builder/builder.git"
8+
"url": "git@github.com:Visualcomposer/builder.git"
99
},
1010
"scripts": {
1111
"test": "BABEL_ENV=test BABEL_JEST_STAGE=0 bash ./tests/jest/devElements/_cloneScript.sh && jest --env=jsdom",
@@ -14,16 +14,15 @@
1414
"build-production": "webpack --version && webpack --config webpack.config.production.4x.babel.js -p",
1515
"build-production-silent": "webpack --version && webpack --config webpack.config.production.4x.babel.js -p --silent",
1616
"watch": "webpack --version && webpack --config webpack.config.4x.babel.js --progress --colors --watch",
17-
"watch-assets-and-elements": "vc watch-elements-and-assets",
1817
"build-settings": "webpack --version && webpack --config webpack-settings.config.4x.babel.js --progress --colors",
1918
"build-settings-production": "webpack --version && webpack --config webpack-settings.config.production.4x.babel.js -p --silent",
2019
"watch-settings": "webpack --version && webpack --config webpack-settings.config.4x.babel.js --progress --colors --watch",
2120
"testcafe-live": "testcafe-live chrome tests/testcafe"
2221
},
23-
"author": "@wpb",
22+
"author": "@visualcomposer",
2423
"license": "GPL-2.0+",
2524
"engines": {
26-
"node": ">=9",
25+
"node": ">=8",
2726
"npm": ">=5.8"
2827
},
2928
"devDependencies": {

0 commit comments

Comments
 (0)