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 = \
|
lessc := node_modules/.bin/lessc
|
||||||
less/**/*.less \
|
lightserver := node_modules/.bin/light-server
|
||||||
less/plex.css
|
|
||||||
|
|
||||||
.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:
|
.PHONY: build dev clean
|
||||||
make build
|
|
||||||
|
|
||||||
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 install
|
||||||
npm run dev
|
touch node_modules # fixes watch bug if you manually ran npm install
|
||||||
|
|
||||||
build: $(OBJS) Makefile
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
clean:
|
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">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<title>tilde theme</title>
|
<title>tilde theme</title>
|
||||||
<link href="/css/dracula.css" rel="stylesheet">
|
<link href="dracula.css" rel="stylesheet">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.tall-row {
|
.tall-row {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<title>tilde theme</title>
|
<title>tilde theme</title>
|
||||||
<link href="/css/hacker.css" rel="stylesheet">
|
<link href="hacker.css" rel="stylesheet">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.tall-row {
|
.tall-row {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tildeteam-css",
|
"name": "tildeteam-css",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,20 +1,14 @@
|
||||||
{
|
{
|
||||||
"name": "tildeteam-css",
|
"name": "tildeteam-css",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "a fork of brobin's h4x0r bootstrap theme, used by tilde.team",
|
"description": "a fork of brobin's h4x0r bootstrap theme, used by tilde.team",
|
||||||
"author": "Ben Harris <ben@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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://tildegit.org/team/css"
|
"url": "https://tildegit.org/team/site/src/branch/master/css"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://tildegit.org/team/css/issues"
|
"url": "https://tildegit.org/team/site/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "3.3.7",
|
"bootstrap": "3.3.7",
|
||||||
|
|
Loading…
Reference in New Issue