Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UNL_Search
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Experience Group
UNL_Search
Commits
41215ab6
Commit
41215ab6
authored
9 years ago
by
Kevin Abel
Browse files
Options
Downloads
Patches
Plain Diff
Remove Makefile that will be replaced by grunt
parent
f723eff1
No related branches found
Branches containing commit
No related tags found
1 merge request
!6
4.1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+0
-62
0 additions, 62 deletions
Makefile
find-node-or-install
+0
-58
0 additions, 58 deletions
find-node-or-install
with
0 additions
and
120 deletions
Makefile
deleted
100644 → 0
+
0
−
62
View file @
f723eff1
SHELL
:=
/bin/bash
CURL
:=
curl
# NodeJS Find/Install
NODE_PATH
=
$(
shell ./find-node-or-install
)
PATH
:=
$(
NODE_PATH
)
:
$(
shell
echo
$$
PATH
)
# External Build Tools
NODE_DIR
=
node_modules
LESSC
=
$(
NODE_DIR
)
/less/bin/lessc
UGLIFYJS
=
$(
NODE_DIR
)
/uglify-js/bin/uglifyjs
# Local Vars
LESS_LIB
=
www/less/lib
# External Dependencies
LESSHAT
:=
$(
LESS_LIB
)
/lesshat.less
WDN_MIXINS
:=
\
$(
LESS_LIB
)
/breakpoints.less
\
$(
LESS_LIB
)
/colors.less
\
$(
LESS_LIB
)
/fonts.less
WDN_LIB_RAW
=
https://raw.githubusercontent.com/unl/wdntemplates/master/wdn/templates_4.0/less/_mixins/
LESSHAT_RAW
=
https://raw.githubusercontent.com/csshat/lesshat/c8c211b2442734bfc1ae2509ff0ccebdc2e73664/build/lesshat.less
# Built Files
CSS_OBJ
=
www/css/search.css
JS_OBJ
=
www/js/search.min.js
all
:
less js
less
:
$(CSS_OBJ)
js
:
$(JS_OBJ)
clean
:
rm
-r
$(
NODE_DIR
)
rm
-r
$(
LESS_LIB
)
rm
$(
JS_OBJ
)
rm
$(
CSS_OBJ
)
$(CSS_OBJ)
:
www/less/search.less $(LESSC) $(LESSHAT) $(WDN_MIXINS)
$(
LESSC
)
--clean-css
$<
$@
$(LESSC)
:
npm
install
less less-plugin-clean-css
$(LESS_LIB)/%.less
:
@
mkdir
-p
$(
@D
)
$(
CURL
)
-s
$(
WDN_LIB_RAW
)$(
@F
)
-o
$@
$(LESSHAT)
:
@
mkdir
-p
$(
@D
)
$(
CURL
)
-s
$(
LESSHAT_RAW
)
-o
$@
$(UGLIFYJS)
:
npm
install
uglify-js
$(JS_OBJ)
:
www/js/search.js $(UGLIFYJS)
$(
UGLIFYJS
)
-c
-m
-o
$@
-p
2
--source-map
$(
<
)
.map
--source-map-url
$(
<F
)
.map
$<
.PHONY
:
all less js clean
This diff is collapsed.
Click to expand it.
find-node-or-install
deleted
100755 → 0
+
0
−
58
View file @
f723eff1
#!/bin/bash
##############################################################################
# Finds the bin directory where node and npm are installed, or installs a
# local copy of them in a temp folder if not found. Then outputs where they
# are.
#
# Usage and install instructions:
# https://github.com/hugojosefson/find-node-or-install
##############################################################################
# Creates temp dir which stays the same every time this script executes
function
setTEMP_DIR
()
{
local
NEW_OS_SUGGESTED_TEMP_FILE
=
$(
mktemp
-t
asdXXXXX
)
local
OS_ROOT_TEMP_DIR
=
$(
dirname
${
NEW_OS_SUGGESTED_TEMP_FILE
}
)
rm
${
NEW_OS_SUGGESTED_TEMP_FILE
}
TEMP_DIR
=
${
OS_ROOT_TEMP_DIR
}
/nvm
mkdir
-p
${
TEMP_DIR
}
}
# Break on error
set
-e
# Try to find node, but don't break if not found
NODE
=
$(
which node
||
true
)
if
[[
-n
"
${
NODE
}
"
]]
;
then
# Good. We found it.
echo
$(
dirname
${
NODE
}
)
else
# Did not find node. Better install it.
# Do it in a temp dir, which stays the same every time this script executes
setTEMP_DIR
cd
${
TEMP_DIR
}
# Do we have nvm here?
if
[[
!
-d
"nvm"
]]
;
then
git clone git://github.com/creationix/nvm.git
>
/dev/null
fi
# Clear and set NVM_* env variables to our installation
mkdir
-p
.nvm
export
NVM_DIR
=
$(
(
cd
.nvm
&&
pwd
)
)
unset
NVM_PATH
unset
NVM_BIN
# Load nvm into current shell
.
nvm/nvm.sh
>
/dev/null
# Install and use latest 0.10.* node
nvm
install
0.10
>
/dev/null
nvm
alias
default 0.10
>
/dev/null
nvm use default
>
/dev/null
# Find and output node's bin directory
NODE
=
$(
which node
)
echo
$(
dirname
${
NODE
}
)
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment