Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
7e29afac
Commit
7e29afac
authored
May 05, 2015
by
Sam Saccone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run jscs over changes to examples
parent
6eb745d2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
6 deletions
+45
-6
.gitignore
.gitignore
+1
-0
.jscsrc
.jscsrc
+1
-0
browser-tests/run.sh
browser-tests/run.sh
+5
-0
tooling/package.json
tooling/package.json
+9
-0
tooling/run.sh
tooling/run.sh
+16
-0
travis-runner.sh
travis-runner.sh
+13
-6
No files found.
.gitignore
View file @
7e29afac
/node_modules
/node_modules
/bower_components
/bower_components
/dist
/dist
/tooling/node_modules
.jscsrc
View file @
7e29afac
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
"function",
"function",
"typeof"
"typeof"
],
],
"excludeFiles": ["**/node_modules/**", "**/bower_components/**"],
"requireSpaceBeforeBlockStatements": true,
"requireSpaceBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"requireParenthesesAroundIIFE": true,
"requireSpacesInConditionalExpression": true,
"requireSpacesInConditionalExpression": true,
...
...
browser-tests/run.sh
0 → 100755
View file @
7e29afac
#!/bin/bash
npm i
&&
\
eval
"npm test --
$@
"
tooling/package.json
0 → 100644
View file @
7e29afac
{
"private"
:
true
,
"scripts"
:
{
"lint"
:
"jscs"
},
"dependencies"
:
{
"jscs"
:
"^1.13.1"
}
}
tooling/run.sh
0 → 100755
View file @
7e29afac
#!/bin/bash
PATHS
=
""
EXAMPLES_DIR
=
"../examples/"
for
arg
in
"
$@
"
do
case
$arg
in
--framework
=
*
)
PATHS+
=
" "
$EXAMPLES_DIR
$(
echo
$arg
|
awk
'{split($0,a,"="); print a[2]}'
)
;;
esac
done
npm i
&&
\
eval
"npm run lint -- -c ../.jscsrc
$PATHS
"
travis-runner.sh
View file @
7e29afac
#!/bin/bash
#!/bin/bash
set
-o
pipefail
set
-o
pipefail
get_changes
()
{
git remote add current https://github.com/tastejs/todomvc.git
&&
\
git fetch
--quiet
current
&&
\
git diff HEAD origin/master
--name-only
|
awk
'BEGIN {FS = "/"}; {print $1 "/" $2 "/" $3}'
|
uniq
|
grep
-v
\/\/
|
grep
examples |
awk
-F
'[/]'
'{print "--framework=" $2}'
}
if
[
"
$TRAVIS_BRANCH
"
=
"master"
]
&&
[
"
$TRAVIS_PULL_REQUEST
"
=
"false"
]
if
[
"
$TRAVIS_BRANCH
"
=
"master"
]
&&
[
"
$TRAVIS_PULL_REQUEST
"
=
"false"
]
then
then
git submodule add
-b
gh-pages https://
${
GH_OAUTH_TOKEN
}
@github.com/
${
GH_OWNER
}
/
${
GH_PROJECT_NAME
}
site
>
/dev/null 2>&1
git submodule add
-b
gh-pages https://
${
GH_OAUTH_TOKEN
}
@github.com/
${
GH_OWNER
}
/
${
GH_PROJECT_NAME
}
site
>
/dev/null 2>&1
...
@@ -16,17 +24,16 @@ then
...
@@ -16,17 +24,16 @@ then
# Any command that using GH_OAUTH_TOKEN must pipe the output to /dev/null to not expose your oauth token
# Any command that using GH_OAUTH_TOKEN must pipe the output to /dev/null to not expose your oauth token
git push https://
${
GH_OAUTH_TOKEN
}
@github.com/
${
GH_OWNER
}
/
${
GH_PROJECT_NAME
}
HEAD:gh-pages
>
/dev/null 2>&1
git push https://
${
GH_OAUTH_TOKEN
}
@github.com/
${
GH_OWNER
}
/
${
GH_PROJECT_NAME
}
HEAD:gh-pages
>
/dev/null 2>&1
else
else
git remote add current https://github.com/tastejs/todomvc.git
&&
\
changes
=
$(
get_changes
)
git fetch current
&&
\
cd
browser-tests/
&&
\
npm i
&&
\
changes
=
$(
git diff HEAD origin/master
--name-only
|
awk
'BEGIN {FS = "/"}; {print $1 "/" $2 "/" $3}'
|
uniq
|
grep
-v
\/\/
|
grep
examples |
awk
-F
'[/]'
'{print "--framework=" $2}'
)
if
[
"
${#
changes
}
"
=
0
]
if
[
"
${#
changes
}
"
=
0
]
then
then
exit
0
exit
0
else
else
echo
changes | xargs npm run
test
--
cd
tooling
&&
\
echo
$changes
| xargs ./run.sh
&&
\
cd
../browser-tests
&&
\
echo
$changes
| xargs ./run.sh
fi
fi
exit
$?
exit
$?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment