Skip to content

Commit 4c57820

Browse files
committed
migrate
1 parent 6400fdc commit 4c57820

File tree

178 files changed

+21174
-55
lines changed

Some content is hidden

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

178 files changed

+21174
-55
lines changed

.gitignore

+112-54
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,115 @@
1-
# Byte-compiled / optimized / DLL files
2-
__pycache__/
3-
*.py[cod]
4-
5-
# C extensions
6-
*.so
7-
8-
# Distribution / packaging
9-
.Python
10-
env/
11-
build/
12-
develop-eggs/
13-
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
*.egg-info/
23-
.installed.cfg
24-
*.egg
25-
26-
# PyInstaller
27-
# Usually these files are written by a python script from a template
28-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
29-
*.manifest
30-
*.spec
31-
32-
# Installer logs
33-
pip-log.txt
34-
pip-delete-this-directory.txt
35-
36-
# Unit test / coverage reports
37-
htmlcov/
38-
.tox/
39-
.coverage
40-
.coverage.*
41-
.cache
42-
nosetests.xml
43-
coverage.xml
44-
*,cover
45-
46-
# Translations
47-
*.mo
48-
*.pot
49-
50-
# Django stuff:
1+
#### joe made this: https://goel.io/joe
2+
3+
#####=== JetBrains ===#####
4+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
5+
6+
*.iml
7+
8+
## Directory-based project format:
9+
.idea/
10+
# if you remove the above rule, at least ignore the following:
11+
12+
# User-specific stuff:
13+
# .idea/workspace.xml
14+
# .idea/tasks.xml
15+
# .idea/dictionaries
16+
17+
# Sensitive or high-churn files:
18+
# .idea/dataSources.ids
19+
# .idea/dataSources.xml
20+
# .idea/sqlDataSources.xml
21+
# .idea/dynamic.xml
22+
# .idea/uiDesigner.xml
23+
24+
# Gradle:
25+
# .idea/gradle.xml
26+
# .idea/libraries
27+
28+
# Mongo Explorer plugin:
29+
# .idea/mongoSettings.xml
30+
31+
## File-based project format:
32+
*.ipr
33+
*.iws
34+
35+
## Plugin-specific files:
36+
37+
# IntelliJ
38+
out/
39+
40+
# mpeltonen/sbt-idea plugin
41+
.idea_modules/
42+
43+
# JIRA plugin
44+
atlassian-ide-plugin.xml
45+
46+
# Crashlytics plugin (for Android Studio and IntelliJ)
47+
com_crashlytics_export_strings.xml
48+
crashlytics.properties
49+
crashlytics-build.properties
50+
51+
#####=== OSX ===#####
52+
.DS_Store
53+
.AppleDouble
54+
.LSOverride
55+
56+
# Icon must end with two \r
57+
Icon
58+
59+
60+
# Thumbnails
61+
._*
62+
63+
# Files that might appear on external disk
64+
.Spotlight-V100
65+
.Trashes
66+
67+
# Directories potentially created on remote AFP share
68+
.AppleDB
69+
.AppleDesktop
70+
Network Trash Folder
71+
Temporary Items
72+
.apdisk
73+
74+
#####=== Node ===#####
75+
76+
# Logs
77+
logs
5178
*.log
5279

53-
# Sphinx documentation
54-
docs/_build/
80+
# Runtime data
81+
pids
82+
*.pid
83+
*.seed
84+
85+
# Directory for instrumented libs generated by jscoverage/JSCover
86+
lib-cov
87+
88+
# Coverage directory used by tools like istanbul
89+
coverage
90+
91+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
92+
.grunt
93+
94+
# node-waf configuration
95+
.lock-wscript
96+
97+
# Compiled binary addons (http://nodejs.org/api/addons.html)
98+
build/Release
99+
100+
# Dependency directory
101+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
102+
node_modules
103+
104+
# Debug log from npm
105+
npm-debug.log
106+
55107

56-
# PyBuilder
57-
target/
108+
#####=== Proprietary ===#####
109+
lib/*.pack/*
110+
src/*.pack/*
111+
lib/*/*.compiled
112+
src/*/*.compiled
113+
lib.compiled/*
114+
/tests/*
115+
coverage/*

.jscs.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"preset": "airbnb"
3+
}

.travis.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
language: node_js
2+
sudo: false
3+
node_js:
4+
- '0.12'
5+
6+
cache:
7+
directories:
8+
- "$(npm root -g)"
9+
10+
branches:
11+
only:
12+
- master
13+
- stage
14+
- test
15+
- dev
16+
17+
before_install:
18+
- npm install -g babel
19+
- npm install -g browserify
20+
- npm install -g mocha
21+
- npm install -g mocha-babel
22+
- npm install -g istanbul
23+
- npm install -g coveralls
24+
- npm install -g codacy-coverage
25+
- npm install -g istanbul-combine
26+
- cp test/package.json .
27+
- test/bin/setup_npm.sh
28+
29+
after_success:
30+
- npm run coverage
31+

LICENSE

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-

bin/.gitkeep

Whitespace-only changes.

bin/_head.sh

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
path=$(cd $(dirname $0); pwd -P)
4+
npm=$(which npm)
5+
6+
publish_npm_package() {
7+
name=$(basename $1)
8+
9+
echo "Publishing "${name}
10+
11+
if [ -z $2 ] || ! $2; then
12+
cd $1 && rm -rf node_modules/ && npm install && ${npm} version $3 && ${npm} publish
13+
else
14+
cd $1 && ${npm} version $3
15+
fi
16+
}
17+
18+
assure_npm() {
19+
if [ -z ${npm} ]; then
20+
assure_brew
21+
22+
echo "Installing nodejs..."
23+
${brew} install nodejs
24+
25+
npm=$(which npm)
26+
fi
27+
}

bin/install_precommit.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
source $(dirname $0)/_head.sh
4+
jscs=`which jscs`
5+
6+
if [ -z ${jscs} ]; then
7+
assure_npm
8+
9+
${npm} -g install jscs
10+
fi
11+
12+
if [ -f ${path}/../.git/hooks/pre-commit ]; then
13+
cp ${path}/../.git/hooks/pre-commit ${path}/../.git/hooks/pre-commit_$(date +%F-%H%M%S).bak
14+
fi
15+
16+
cp ${path}/pre-commit ${path}/../.git/hooks/.

bin/pre-commit

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
files=$(git diff --cached --name-only --diff-filter=ACM | egrep "^lib/(.)+/lib/(.)+\.js$|^microservice/(.)+/Backend/src/(.)+\.es6$|^src/(.)+/lib/(.)+\.js$")
4+
5+
if [ "$files" = "" ]; then
6+
exit 0
7+
fi
8+
9+
pass=true
10+
11+
echo -e "\nValidating JavaScript:\n"
12+
13+
for file in ${files}; do
14+
output=$(jscs ${file} --config=./.jscs.json)
15+
16+
jscs_run_result=$(echo $?)
17+
18+
if [ ${jscs_run_result} -eq 0 ]; then
19+
echo -e "\t\033[32mJSCS Passed: ${file}\033[0m"
20+
else
21+
echo -e "\t\033[31mJSCS Failed: ${file}\033[0m"
22+
pass=false
23+
fi
24+
done
25+
26+
echo -e "\nJavaScript validation complete\n"
27+
28+
if ! $pass; then
29+
echo -e "\033[41mCOMMIT FAILED:\033[0m Your commit contains files that should pass JSCS but do not. Please fix the JSCS errors and try again.\n"
30+
exit 1
31+
else
32+
echo -e "\033[42mCOMMIT SUCCEEDED\033[0m\n"
33+
fi

bin/publish.sh

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env bash
2+
3+
source $(dirname $0)/_head.sh
4+
5+
assure_npm
6+
7+
DRY_RUN=false
8+
HELP=false
9+
VERSION_TYPE="patch"
10+
11+
for i in "$@"
12+
do
13+
case ${i} in
14+
--patch)
15+
VERSION_TYPE="patch"
16+
;;
17+
--minor)
18+
VERSION_TYPE="minor"
19+
;;
20+
--major)
21+
VERSION_TYPE="major"
22+
;;
23+
--help)
24+
HELP=true
25+
;;
26+
--dry-run)
27+
DRY_RUN=true
28+
;;
29+
esac
30+
31+
shift
32+
done
33+
34+
if ${HELP}; then
35+
echo "-------------------------------------------------------------------"
36+
echo "Usage example: bin/publish.sh --dry-run"
37+
echo ""
38+
echo "Arguments and options:"
39+
echo " --dry-run Skip uploading packages to NPM registry"
40+
echo "-------------------------------------------------------------------"
41+
exit 0
42+
fi
43+
44+
if ${DRY_RUN}; then
45+
echo ""
46+
echo "Dry run mode on!!!"
47+
echo ""
48+
fi
49+
50+
publish_npm_package ${path}"/../src" ${DRY_RUN} ${VERSION_TYPE}

0 commit comments

Comments
 (0)