Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit e15c9f1

Browse files
committed
initial opensource commit
0 parents  commit e15c9f1

File tree

955 files changed

+72493
-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.

955 files changed

+72493
-0
lines changed

.editorconfig

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
[*]
2+
charset=utf-8
3+
end_of_line=lf
4+
insert_final_newline=false
5+
indent_style=tab
6+
tab_width=4
7+
8+
[{*.sht,*.html,*.shtm,*.shtml,*.ng,*.htm}]
9+
indent_style=tab
10+
tab_width=2
11+
12+
[{phpunit.xml.dist,*.jhm,*.xjb,*.rng,*.qrc,*.wsdl,*.fxml,*.pom,*.xslt,*.jrxml,*.ant,*.svg,*.xul,*.xsl,*.xsd,*.tld,*.jnlp,*.wsdd,*.wadl,*.xml}]
13+
indent_style=tab
14+
tab_width=2
15+
16+
[{.babelrc,.stylelintrc,.eslintrc,jest.config,*.bowerrc,*.jsb3,*.jsb2,*.json}]
17+
indent_style=tab
18+
tab_width=2
19+
20+
[*.css]
21+
indent_style=tab
22+
tab_width=2
23+
24+
[{openjscad,*.applejs,*.js}]
25+
indent_style=space
26+
indent_size=4
27+
28+
[{*.ts,*.ats}]
29+
indent_style=tab
30+
tab_width=2
31+
32+
[*.tsx]
33+
indent_style=tab
34+
tab_width=2
35+
36+
[*.js.flow]
37+
indent_style=space
38+
indent_size=4
39+
40+
[*.jsx]
41+
indent_style=space
42+
indent_size=4
43+
44+
[{jshint.json,*.jshintrc}]
45+
indent_style=tab
46+
tab_width=2
47+
48+
[{*.jscs.json,*.jscsrc}]
49+
indent_style=tab
50+
tab_width=2
51+
52+
[{*.module,*.hphp,*.phtml,*.php5,*.php4,*.php,*.inc}]
53+
indent_style=space
54+
indent_size=4
55+
56+
[*.coffee]
57+
indent_style=space
58+
indent_size=2
59+
60+
[*.conf]
61+
indent_style=space
62+
indent_size=2
63+
64+
[*.less]
65+
indent_style=tab
66+
tab_width=2
67+
68+
[*.sass]
69+
indent_style=space
70+
indent_size=2
71+
72+
[*.scss]
73+
indent_style=space
74+
indent_size=2
75+
76+
[*.styl]
77+
indent_style=space
78+
indent_size=2
79+
80+
[{scratch_29,*.yml,*.yaml}]
81+
indent_style=space
82+
indent_size=2
83+
84+
[{*.pyw,*.py}]
85+
indent_style=space
86+
indent_size=4
87+
88+
[*.pyi]
89+
indent_style=space
90+
indent_size=4
91+
92+
[{*.pyx,*.pxi,*.pxd}]
93+
indent_style=space
94+
indent_size=4
95+
96+
[tslint.json]
97+
indent_style=tab
98+
tab_width=2
99+

.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.*.sw*
2+
.DS_Store
3+
node_modules/
4+
typings/
5+
test-report/
6+
dist/
7+
src/**/*.js
8+
src/**/*.js.map
9+
!src/**/*.config.js
10+
!src/config.js
11+
npm-debug.log
12+
.sass-cache/
13+
.idea/
14+
.chrome_karma
15+
compiled-src
16+
code/
17+
temp/
18+
19+
!src/breakdown/static/js/*.js

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.9.3

README.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Badgr UI
2+
An Angular 2 based front end for Badgr-server. Uses TypeScript with ES6 style module loading and a webpack-based build process.
3+
4+
5+
## Install Instructions (for developers)
6+
7+
## System-wide prerequisites (OS X):
8+
* node and npm: see https://docs.npmjs.com/getting-started/installing-node
9+
10+
### Install and configure project
11+
* Install node/npm version using nvm: `nvm install && nvm use`
12+
* Install project-specific node dependencies. `npm install`
13+
14+
15+
### Run project in your browser
16+
17+
Start webpack in dev mode: `npm run server`
18+
19+
Badgr should now be loaded in your browser. If not, navigate to http://localhost:4000
20+
21+
22+
### Run Tests
23+
24+
Run the test suite with `npm run test:debug`
25+
26+
Run the e2e tests with `npm run e2e`
27+
28+
29+
### Run Styleguide
30+
31+
Build and serve the styleguide with `npm run styleguide:serve`
32+
33+
Then view it at http://localhost:8080/styleguide/
34+
35+
36+
## Build Instructions (for deployment)
37+
38+
### Building
39+
40+
Build the packaged files for deployment with `npm run build:prod`
41+
42+
Run the tests with `npm run test:ci`
43+
44+
All files in `dist` constitute the build artifact. A config.js must be included as well for the app to function.
45+
An example can be found in `src/configs/config.local.js`
46+
47+
### Release Branching and Tagging
48+
49+
Badgr UI release branches follow the `release/vA.B.x` format, with a separate branch for each minor version, and a
50+
tag for each patch release (e.g. `v2.3.1`).
51+
52+
To create a release branch, simply run e.g. `git checkout -b release/v6.5.x`
53+
54+
To create a tag for a specific version, including the first tag, run `node tag-branch.js` which will also push the tag

SPECFILE

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
%define name badgr-ui
2+
%define app_user web
3+
%define install_dir /opt/site
4+
%define base_dir %{_builddir}/%{version}
5+
6+
Summary: Badgr UI
7+
Name: %{name}
8+
Version: %{version}
9+
Release: %{release}
10+
Source0: ./%{name}.tar.gz
11+
License: Proprietary
12+
Group: Development/Libraries
13+
Prefix: %{_prefix}
14+
15+
BuildArch: x86_64
16+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
17+
18+
Vendor: Concentric Sky, Inc.
19+
20+
Requires(pre): /usr/sbin/useradd, /usr/bin/getent
21+
Requires(postun): /usr/sbin/userdel
22+
23+
%description
24+
RPM Representation of Code tarball.
25+
26+
%prep
27+
%setup -n %{version}
28+
29+
%clean
30+
%{__rm} -rf $RPM_BUILD_ROOT
31+
32+
33+
%pre
34+
/usr/bin/getent group %{app_user} || /usr/sbin/groupadd -r %{app_user}
35+
/usr/bin/getent passwd %{app_user} || /usr/sbin/useradd -r -d %{install_dir} -s /bin/bash %{app_user} -g %{app_user} -k /etc/skel -m
36+
37+
%preun
38+
39+
%post
40+
%{__rm} -f %{install_dir}/code
41+
%{__ln_s} -f %{install_dir}/builds/%{version}/code %{install_dir}/code
42+
/bin/chown %{app_user}:%{app_user} -R %{install_dir}
43+
44+
%postun
45+
%{__rm} -rf %{install_dir}/builds/%{version}
46+
if [ "$1" = "0" ]; then
47+
# If the first argument to %preun and %postun is 0, the action is uninstallation.
48+
%{__rm} -f %{install_dir}/code
49+
fi
50+
51+
%build
52+
yarn
53+
npm run build:prod
54+
55+
56+
%install
57+
%{__mkdir_p} %{buildroot}%{install_dir}/builds/%{version}/code
58+
%{__cp} -Rp ./dist/* %{buildroot}%{install_dir}/builds/%{version}/code/
59+
60+
echo "%{version}-%{release}" > %{buildroot}%{install_dir}/builds/%{version}/code/version.txt
61+
echo '{"version": '"\"%{version}\""', "release": '"\"%{release}\""', "commit_sha": '"\"%{git_sha}\""', "build_date": '"\"%{build_date}\""'}' > %{buildroot}%{install_dir}/builds/%{version}/code/buildInfo.json
62+
63+
%files
64+
%defattr(0750,%{app_user},%{app_user},0750)
65+
%{install_dir}/builds/%{version}
66+
67+
%changelog
68+
* Fri Oct 6 2017 Francisco Gray <[email protected]> - %{version}-%{release}
69+
- First packaging of badgr-ui

badgr-ui-code-style.xml

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
<code_scheme name="Project">
2+
<option name="OTHER_INDENT_OPTIONS">
3+
<value>
4+
<option name="INDENT_SIZE" value="4" />
5+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
6+
<option name="TAB_SIZE" value="4" />
7+
<option name="USE_TAB_CHARACTER" value="true" />
8+
<option name="SMART_TABS" value="true" />
9+
<option name="LABEL_INDENT_SIZE" value="0" />
10+
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
11+
<option name="USE_RELATIVE_INDENTS" value="false" />
12+
</value>
13+
</option>
14+
<option name="GENERATE_FINAL_LOCALS" value="true" />
15+
<option name="GENERATE_FINAL_PARAMETERS" value="true" />
16+
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="100" />
17+
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
18+
<value>
19+
<package name="javax.swing" withSubpackages="false" static="false" />
20+
<package name="org.hamcrest.CoreMatchers" withSubpackages="true" static="false" />
21+
<package name="org.hamcrest.MatcherAssert" withSubpackages="true" static="false" />
22+
</value>
23+
</option>
24+
<option name="JD_PARAM_DESCRIPTION_ON_NEW_LINE" value="true" />
25+
<option name="HTML_ATTRIBUTE_WRAP" value="4" />
26+
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
27+
<option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html,body" />
28+
<option name="WRAP_COMMENTS" value="true" />
29+
<TypeScriptCodeStyleSettings>
30+
<option name="SPACE_AFTER_TYPE_COLON" value="true" />
31+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
32+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
33+
<option name="USE_CHAINED_CALLS_GROUP_INDENTS" value="true" />
34+
</TypeScriptCodeStyleSettings>
35+
<XML>
36+
<option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
37+
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
38+
</XML>
39+
<codeStyleSettings language="CSS">
40+
<indentOptions>
41+
<option name="INDENT_SIZE" value="2" />
42+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
43+
<option name="TAB_SIZE" value="2" />
44+
<option name="USE_TAB_CHARACTER" value="true" />
45+
</indentOptions>
46+
</codeStyleSettings>
47+
<codeStyleSettings language="ECMA Script Level 4">
48+
<option name="WRAP_COMMENTS" value="true" />
49+
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
50+
</codeStyleSettings>
51+
<codeStyleSettings language="HTML">
52+
<indentOptions>
53+
<option name="INDENT_SIZE" value="2" />
54+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
55+
<option name="TAB_SIZE" value="2" />
56+
<option name="USE_TAB_CHARACTER" value="true" />
57+
<option name="SMART_TABS" value="true" />
58+
</indentOptions>
59+
</codeStyleSettings>
60+
<codeStyleSettings language="JSON">
61+
<indentOptions>
62+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
63+
<option name="TAB_SIZE" value="2" />
64+
<option name="USE_TAB_CHARACTER" value="true" />
65+
</indentOptions>
66+
</codeStyleSettings>
67+
<codeStyleSettings language="JavaScript">
68+
<option name="CALL_PARAMETERS_WRAP" value="5" />
69+
<option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
70+
<option name="CALL_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
71+
<option name="METHOD_PARAMETERS_WRAP" value="5" />
72+
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
73+
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
74+
<indentOptions>
75+
<option name="INDENT_SIZE" value="2" />
76+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
77+
<option name="TAB_SIZE" value="2" />
78+
<option name="USE_TAB_CHARACTER" value="true" />
79+
<option name="SMART_TABS" value="true" />
80+
</indentOptions>
81+
</codeStyleSettings>
82+
<codeStyleSettings language="LESS">
83+
<indentOptions>
84+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
85+
<option name="TAB_SIZE" value="2" />
86+
<option name="USE_TAB_CHARACTER" value="true" />
87+
</indentOptions>
88+
</codeStyleSettings>
89+
<codeStyleSettings language="TypeScript">
90+
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
91+
<option name="ALIGN_MULTILINE_FOR" value="false" />
92+
<option name="ALIGN_MULTILINE_TERNARY_OPERATION" value="true" />
93+
<option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
94+
<option name="SPACE_WITHIN_BRACKETS" value="true" />
95+
<option name="CALL_PARAMETERS_WRAP" value="5" />
96+
<option name="METHOD_PARAMETERS_WRAP" value="5" />
97+
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
98+
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
99+
<option name="TERNARY_OPERATION_WRAP" value="5" />
100+
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
101+
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
102+
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
103+
<option name="FOR_STATEMENT_WRAP" value="5" />
104+
<option name="FOR_STATEMENT_LPAREN_ON_NEXT_LINE" value="true" />
105+
<option name="FOR_STATEMENT_RPAREN_ON_NEXT_LINE" value="true" />
106+
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
107+
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
108+
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
109+
<option name="IF_BRACE_FORCE" value="3" />
110+
<option name="DOWHILE_BRACE_FORCE" value="3" />
111+
<option name="WHILE_BRACE_FORCE" value="3" />
112+
<option name="FOR_BRACE_FORCE" value="3" />
113+
<indentOptions>
114+
<option name="INDENT_SIZE" value="2" />
115+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
116+
<option name="TAB_SIZE" value="2" />
117+
<option name="USE_TAB_CHARACTER" value="true" />
118+
<option name="SMART_TABS" value="true" />
119+
</indentOptions>
120+
</codeStyleSettings>
121+
<codeStyleSettings language="XML">
122+
<indentOptions>
123+
<option name="INDENT_SIZE" value="2" />
124+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
125+
<option name="TAB_SIZE" value="2" />
126+
<option name="USE_TAB_CHARACTER" value="true" />
127+
<option name="SMART_TABS" value="true" />
128+
</indentOptions>
129+
</codeStyleSettings>
130+
</code_scheme>

0 commit comments

Comments
 (0)