fix up makefile, remove npm scripts from package.json
thanks to @tomasino for the help with the makefile! don't use npm run * make compiles all scripts; make dev starts the live-reload dev server
This commit is contained in:
parent
7707e5fd9e
commit
a2ff9e3c48
40
css/Makefile
40
css/Makefile
|
@ -1,19 +1,33 @@
|
|||
OBJS = \
|
||||
less/**/*.less \
|
||||
less/plex.css
|
||||
lessc := node_modules/.bin/lessc
|
||||
lightserver := node_modules/.bin/light-server
|
||||
|
||||
.PHONY: all dev build clean
|
||||
NPM != command -v npm 2> /dev/null
|
||||
PLEX = less/plex.css
|
||||
HACKER = less/hacker/*.less $(PLEX)
|
||||
DRACULA = less/dracula/*.less $(PLEX)
|
||||
|
||||
all:
|
||||
make build
|
||||
.PHONY: build dev clean
|
||||
|
||||
dev: $(OBJS) Makefile
|
||||
# First target is default
|
||||
build: hacker.css dracula.css
|
||||
|
||||
dev: build
|
||||
$(lightserver) -s . -p 9000 -w "index.html, **/*.less \# make" -o
|
||||
|
||||
hacker.css: node_modules $(HACKER)
|
||||
$(lessc) less/hacker.less hacker.css --clean-css="--s1 --advanced --compatibility=ie8"
|
||||
|
||||
dracula.css: node_modules $(DRACULA)
|
||||
$(lessc) less/dracula.less dracula.css --clean-css="--s1 --advanced --compatibility=ie8"
|
||||
|
||||
node_modules: package.json package-lock.json Makefile
|
||||
ifndef NPM
|
||||
$(error Missing dependency 'npm'. Please install and try again.)
|
||||
endif
|
||||
npm install
|
||||
npm run dev
|
||||
|
||||
build: $(OBJS) Makefile
|
||||
npm install
|
||||
npm run build
|
||||
touch node_modules # fixes watch bug if you manually ran npm install
|
||||
|
||||
clean:
|
||||
rm -rf node_modules; rm dracula.css hacker.css; touch Makefile; make
|
||||
rm -rf node_modules
|
||||
rm dracula.css
|
||||
rm hacker.css
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>tilde theme</title>
|
||||
<link href="/css/dracula.css" rel="stylesheet">
|
||||
<link href="dracula.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.tall-row {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>tilde theme</title>
|
||||
<link href="/css/hacker.css" rel="stylesheet">
|
||||
<link href="hacker.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.tall-row {
|
||||
|
|
2
css/package-lock.json
generated
2
css/package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "tildeteam-css",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
{
|
||||
"name": "tildeteam-css",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "a fork of brobin's h4x0r bootstrap theme, used by tilde.team",
|
||||
"author": "Ben Harris <ben@tilde.team>",
|
||||
"scripts": {
|
||||
"build": "npm run build-hacker & npm run build-dracula",
|
||||
"build-hacker": "lessc less/hacker.less hacker.css --clean-css=\"--s1 --advanced --compatibility=ie8\"",
|
||||
"build-dracula": "lessc less/dracula.less dracula.css --clean-css=\"--s1 --advanced --compatibility=ie8\"",
|
||||
"dev": "npm run build && light-server -s . -p 9000 -w \"index.html, **/*.less # npm run build\" -o"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://tildegit.org/team/css"
|
||||
"url": "https://tildegit.org/team/site/src/branch/master/css"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://tildegit.org/team/css/issues"
|
||||
"url": "https://tildegit.org/team/site/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap": "3.3.7",
|
||||
|
|
Loading…
Reference in New Issue
Block a user