Skip to content

Commit 5d2fd71

Browse files
chore: merge alloy-ui history into third-party/projects
2 parents 0511e69 + 80b7d44 commit 5d2fd71

File tree

1,554 files changed

+202220
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,554 files changed

+202220
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"alloycore": [ "aui-base-core" ],
3+
"alloyregex": "(aui|yui(",
4+
"yuiversion": "patched-v3.18.1",
5+
"version": "3.1.0-deprecated.86"
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# See editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = false
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
api
2+
build
3+
bower_components
4+
coverage
5+
temp
6+
maven-dist
7+
node_modules
8+
npm-debug.log
9+
.sass-cache
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"html": {
3+
"braceStyle": "end-expand",
4+
"indentChar": " ",
5+
"indentScripts": "keep",
6+
"indentSize": 4,
7+
"maxPreserveNewlines": 2,
8+
"preserveNewlines": true,
9+
"unformatted": ["a", "sub", "sup", "b", "i", "u"],
10+
"wrapLineLength": 100
11+
},
12+
"js": {
13+
"braceStyle": "end-expand",
14+
"breakChainedMethods": false,
15+
"e4x": false,
16+
"evalCode": false,
17+
"indentChar": " ",
18+
"indentLevel": 0,
19+
"indentSize": 4,
20+
"indentWithTabs": false,
21+
"jslintHappy": false,
22+
"keepArrayIndentation": true,
23+
"keepFunctionIndentation": true,
24+
"maxPreserveNewlines": 2,
25+
"preserveNewlines": true,
26+
"spaceBeforeConditional": true,
27+
"spaceInParen": false,
28+
"unescapeStrings": false,
29+
"wrapLineLength": 120
30+
}
31+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
src/yui/js/load-tests.js
2+
src/aui-event/meta/aui-event-input-test.js
3+
src/aui-base/js/aui-loader.js
4+
src/aui-base/js/aui-aliases.js
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"asi": false,
3+
"bitwise": true,
4+
"boss": true,
5+
"browser": true,
6+
"curly": true,
7+
"debug": false,
8+
"eqeqeq": true,
9+
"eqnull": false,
10+
"es5": false,
11+
"esnext": false,
12+
"evil": false,
13+
"expr": true,
14+
"forin": true,
15+
"funcscope": false,
16+
"globals": {
17+
"ace": true,
18+
"A": true,
19+
"Y": true,
20+
"AUI": true,
21+
"YUI": true,
22+
"YUITest": true
23+
},
24+
"globalstrict": false,
25+
"immed": true,
26+
"iterator": false,
27+
"lastsemic": false,
28+
"latedef": true,
29+
"laxbreak": false,
30+
"laxcomma": false,
31+
"loopfunc": false,
32+
"maxerr": 10000,
33+
"maxlen": 150,
34+
"multistr": false,
35+
"newcap": true,
36+
"noarg": true,
37+
"node": true,
38+
"noempty": true,
39+
"nomen": false,
40+
"onevar": false,
41+
"passfail": false,
42+
"plusplus": false,
43+
"proto": false,
44+
"quotmark": "single",
45+
"scripturl": true,
46+
"shadow": false,
47+
"smarttabs": false,
48+
"strict": false,
49+
"sub": false,
50+
"supernew": false,
51+
"trailing": true,
52+
"undef": true,
53+
"unused": true,
54+
"white": false,
55+
"yui": true
56+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"basedir": ".",
3+
"glob": "**/tests/unit/*.html"
4+
}
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Contributing
2+
3+
Over the years, tests and documentation have sometimes been sacrificed in order to speed up the development process. As result, not all of the modules had tests or documentation. When there were only two or three developers, the lack of tests was not a big issue since they knew the code very well and the risk of regressions was relatively low, however, when more and more [contributors](http://alloyui.com/about/) were involved, this stopped working and made it harder and harder to keep the library in good condition.
4+
5+
As a result, we have instituted new policies related to the tests and documentation which have recently been added to AlloyUI. We would love to share them with you:
6+
7+
## 1. Issues
8+
9+
First of all, you should know that we are not using [GitHub Issues](https://github.com/liferay/alloy-ui/issues), instead we use [Jira](http://issues.liferay.com/browse/AUI).
10+
11+
In order for us to help you, please check that you have completed the following steps:
12+
13+
* Make sure that you are using the latest version.
14+
* Look through the list of issues to ensure that the bug has not already been reported.
15+
16+
If you are still facing the problem, go ahead and [create an issue](http://issues.liferay.com/secure/CreateIssue!default.jspa). Just remember to include as much information about the bug as possible.
17+
18+
## 2. Code Style
19+
20+
This project uses single-quotes, four space indentation and white space around arguments. Please ensure any pull requests follow this closely by using the [EditorConfig file](https://github.com/liferay/alloyui.com/blob/master/.editorconfig) and linting your code with our [JSHint options](https://github.com/liferay/alloyui.com/blob/master/.jshintrc). If you notice existing code which does not follow these practices, feel free to shout out and we will change it.
21+
22+
> See [AlloyUI Code Style Guidelines](https://github.com/liferay/alloy-ui/wiki/Code-Style-Guidelines).
23+
24+
## 3. Tests
25+
26+
No single commit should go to AlloyUI source tree without tests. Exceptions are allowed for some source formatting (like renaming variables or converting spaces to tabs, etc.), but for each bug fix or for each feature added, **tests must be present**.
27+
28+
> See [AlloyUI Testing Guidelines](https://github.com/liferay/alloy-ui/wiki/Testing-Guidelines).
29+
30+
## 4. Documentation
31+
32+
All code should be properly documented using [YUIDoc syntax](http://yui.github.io/yuidoc/syntax/index.html). Documentation should be considered as part of the code.
33+
34+
> See [AlloyUI Documentation Guidelines](https://github.com/liferay/alloy-ui/wiki/Documentation-Guidelines).
35+
36+
## 5. History
37+
38+
The changes should be described in `HISTORY.md` file which every module has, so it is easy to track which changes have been added between two versions.
39+
40+
## Conclusion
41+
42+
In short, that is it!
43+
44+
We would highly appreciate if you help us in the process of creating tests and documentation. There is no better way to get involved in this great project!
45+
46+
Happy hacking!
47+
48+
## Setup
49+
50+
1. Install NodeJS <= [v0.12.0](http://nodejs.org/dist/v0.12.0/), if you do not have it yet.
51+
52+
2. Install global dependencies:
53+
54+
```
55+
[sudo] npm install -g gulp
56+
```
57+
58+
3. Install local dependencies:
59+
60+
```
61+
npm install
62+
```
63+
64+
4. Initialize and fetch dependencies via Bower:
65+
66+
```
67+
gulp init
68+
```
69+
70+
5. Build AlloyUI & YUI3 using Shifter:
71+
72+
```
73+
gulp build
74+
```
75+
76+
## Development
77+
78+
Rebuild AUI components:
79+
80+
```
81+
gulp build-aui
82+
```
83+
84+
If run at the root level, it will build all AUI components.
85+
86+
If run within a component folder (ie. `cd src/aui-datatable`), it will only build that specific component.
87+
88+
Watch for changes and rebuild automatically:
89+
90+
```
91+
gulp watch
92+
```
93+
94+
### Testing your local version of Alloy UI
95+
96+
When developing, it is good practice to test the changes you make in various environments.
97+
98+
Since Alloy UI is used primarily within [Liferay portal](https://github.com/liferay/liferay-portal), it is important to have your changes tested in Liferay to ensure there are no regressions.
99+
100+
We have created the `liferay-gulp-tasks` package to help deploying a local version to test.
101+
102+
Once you have made all your necessary modifications and built a working copy of Alloy UI and are ready for testing, you can run:
103+
104+
```
105+
gulp maven-install
106+
```
107+
108+
This command will put a local AlloyUI version in you `~/.m2` folder which is where Liferay will search for local WebJars. If they are not found locally, Liferay will search of them on Nexus, and if found, it will download it to be consumed by Liferay.
109+
110+
When you have successfully run the command to put this local version on your machine, you will need to update the `build.gradle` files in Liferay to use these new versions of Alloy UI.
111+
112+
You will need to update `String alloyUIVersion = [VERSION]` found at [https://github.com/liferay/liferay-portal/blob/master/modules/apps/frontend-js/frontend-js-aui-web/build.gradle#L10](https://github.com/liferay/liferay-portal/blob/master/modules/apps/frontend-js/frontend-js-aui-web/build.gradle#L10) and [https://github.com/liferay/liferay-portal/blob/master/modules/apps/frontend-theme/frontend-theme-unstyled/build.gradle#L18](https://github.com/liferay/liferay-portal/blob/master/modules/apps/frontend-theme/frontend-theme-unstyled/build.gradle#L18) to this new version.
113+
114+
When completed, you can redeploy the 2 Liferay modules, `frontend-js` and `frontend-theme` to test your changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Software License Agreement (BSD-3-Clause License)
2+
3+
Copyright (c) 2014, Liferay Inc.
4+
All rights reserved.
5+
6+
Redistribution and use of this software in source and binary forms, with or without modification, are
7+
permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above
10+
copyright notice, this list of conditions and the
11+
following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above
14+
copyright notice, this list of conditions and the
15+
following disclaimer in the documentation and/or other
16+
materials provided with the distribution.
17+
18+
* The name of Liferay Inc. may not be used to endorse or promote products
19+
derived from this software without specific prior
20+
written permission of Liferay Inc.
21+
22+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
23+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
24+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
25+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
28+
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+

0 commit comments

Comments
 (0)