Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos.core
Commits
f4fad40f
Commit
f4fad40f
authored
Jul 24, 2012
by
Thomas Lechauve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint all javascript files when building
parent
b9dee713
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
vifib/Makefile
vifib/Makefile
+17
-6
No files found.
vifib/Makefile
View file @
f4fad40f
...
@@ -5,6 +5,9 @@ NAME = build
...
@@ -5,6 +5,9 @@ NAME = build
TARBALL
=
slapos.tar.gz
TARBALL
=
slapos.tar.gz
JSLINT
=
jslint
JSLINTOPTIONS
=
--maxerr
=
5
DEVDIR
=
${NAME}
_dev
DEVDIR
=
${NAME}
_dev
RELDIR
=
${NAME}
RELDIR
=
${NAME}
...
@@ -14,7 +17,7 @@ DEVCSS = slapos.css
...
@@ -14,7 +17,7 @@ DEVCSS = slapos.css
FINALJS
=
slapos.js
FINALJS
=
slapos.js
FINALCSS
=
slapos.css
FINALCSS
=
slapos.css
all
:
dev
release
all
:
dev
#########################################
#########################################
# Dev environment
# Dev environment
...
@@ -22,21 +25,21 @@ all: dev release
...
@@ -22,21 +25,21 @@ all: dev release
# Emulate server responses with sinonjs
# Emulate server responses with sinonjs
fake
:
dev ${DEVDIR}/js/fake.js
fake
:
dev ${DEVDIR}/js/fake.js
cat
$(CATJSFILES)
${DEVDIR}
/js/fake.js
>
${DEVDIR}
/
$(DEVJS)
more
${DEVDIR}
/js/fake.js
>
>
${DEVDIR}
/
$(DEVJS)
${DEVDIR}/js/fake.js
:
js/utils/fake.js
${DEVDIR}/js/fake.js
:
js/utils/fake.js
@
mkdir
-p
$
(
@D
)
@
mkdir
-p
$
(
@D
)
cp
$<
$@
cp
$<
$@
# Sort files for concatenation
# Sort files for concatenation
CATJSFILES
=
${DEVDIR}
/lib/jquery.js
${DEVDIR}
/lib/sinon.js
${DEVDIR}
/lib/mustache.js
${DEVDIR}
/lib/spin.js
${DEVDIR}
/lib/modernizr.js
${DEVDIR}
/lib/swipe.js
${DEVDIR}
/js/jquery.slapos.js
${DEVDIR}
/js/init.js
${DEVDIR}
/lib/jquery-mobile.js
${DEVDIR}
/
js/url.js
${DEVDIR}
/js
/route.js
${DEVDIR}
/js/main.js
${DEVDIR}
/js/render.js
${DEVDIR}
/js/panels.js
${DEVDIR}
/js/pages.js
${DEVDIR}
/js/pages.mobile.js
${DEVDIR}
/js/pages.tablet.js
${DEVDIR}
/js/pages.desktop.js
CATJSFILES
=
${DEVDIR}
/lib/jquery.js
${DEVDIR}
/lib/sinon.js
${DEVDIR}
/lib/mustache.js
${DEVDIR}
/lib/spin.js
${DEVDIR}
/lib/modernizr.js
${DEVDIR}
/lib/swipe.js
${DEVDIR}
/js/jquery.slapos.js
${DEVDIR}
/js/init.js
${DEVDIR}
/lib/jquery-mobile.js
${DEVDIR}
/
lib/url.js
${DEVDIR}
/lib
/route.js
${DEVDIR}
/js/main.js
${DEVDIR}
/js/render.js
${DEVDIR}
/js/panels.js
${DEVDIR}
/js/pages.js
${DEVDIR}
/js/pages.mobile.js
${DEVDIR}
/js/pages.tablet.js
${DEVDIR}
/js/pages.desktop.js
CATCSSFILES
=
${DEVDIR}
/lib/qunit.css
CATCSSFILES
=
${DEVDIR}
/lib/qunit.css
# List all javascript files except tests files
# List all javascript files except tests files
JSFILES
=
$
(
find
$(JSDIR)
-name
'tests'
-prune
-o
-name
"*.js"
-print
)
JSFILES
=
$
(
find
$(JSDIR)
-name
'tests'
-prune
-o
-name
'lib'
-prune
-o
-name
"*.js"
-print
)
dev
:
${DEVDIR}/lib/sinon.js ${DEVDIR}/lib/jquery.js ${DEVDIR}/lib/qunit.js ${DEVDIR}/lib/qunit.css ${DEVDIR}/lib/jquery-mobile.js ${DEVDIR}/lib/modernizr.js ${DEVDIR}/lib/mustache.js ${DEVDIR}/lib/spin.js ${DEVDIR}/lib/swipe.js $(patsubst %.js
,
${DEVDIR}/js/%.js
,
$(JSFILES)) ${DEVDIR}/index.html ${DEVDIR}/$(DEVJS) ${DEVDIR}/$(DEVCSS)
dev
:
${DEVDIR}/lib/sinon.js ${DEVDIR}/lib/jquery.js ${DEVDIR}/lib/qunit.js ${DEVDIR}/lib/qunit.css ${DEVDIR}/lib/jquery-mobile.js ${DEVDIR}/lib/modernizr.js ${DEVDIR}/lib/mustache.js ${DEVDIR}/lib/spin.js ${DEVDIR}/lib/swipe.js $
{DEVDIR}/lib/route.js ${DEVDIR}/lib/url.js $
(patsubst %.js
,
${DEVDIR}/js/%.js
,
$(JSFILES)) ${DEVDIR}/index.html ${DEVDIR}/$(DEVJS) ${DEVDIR}/$(DEVCSS)
${DEVDIR}/index.html
:
index.html
${DEVDIR}/index.html
:
index.html
@
mkdir
-p
$
(
@D
)
@
mkdir
-p
$
(
@D
)
...
@@ -45,10 +48,18 @@ ${DEVDIR}/index.html: index.html
...
@@ -45,10 +48,18 @@ ${DEVDIR}/index.html: index.html
# Lint javascript files #
# Lint javascript files #
${DEVDIR}/js/%.js
:
js/%.js
${DEVDIR}/js/%.js
:
js/%.js
@
mkdir
-p
$
(
@D
)
@
mkdir
-p
$
(
@D
)
#
${JSLINT}
--indent
2
--maxerr
3
$<
@
# Prepend jslintrc to defined global variables #
@
more jslintrc |
cat
-
$<
>
/tmp/
$(
notdir
$<
)
${JSLINT}
${JSLINTOPTIONS}
/tmp/
$(
notdir
$<
)
cp
$<
$@
cp
$<
$@
# Dependencies #
# Dependencies #
${DEVDIR}/lib/route.js
:
cp
js/lib/route.js
$@
${DEVDIR}/lib/url.js
:
cp
js/lib/url.js
$@
${DEVDIR}/lib/qunit.%
:
${DEVDIR}/lib/qunit.%
:
@
mkdir
-p
$
(
@D
)
@
mkdir
-p
$
(
@D
)
curl
-s
-o
$@
http://code.jquery.com/qunit/qunit-1.5.0
$(
suffix
$@
)
curl
-s
-o
$@
http://code.jquery.com/qunit/qunit-1.5.0
$(
suffix
$@
)
...
...
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