forked from contentful/ui-extensions-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (31 loc) · 783 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
export PATH := ./node_modules/.bin:${PATH}
.PHONY: build build-pages lint clean test
# Compile the API from the lib directory into dist/cf-extension-api.js and dist/cf-extension-api.css
build: styles
@mkdir -p dist
webpack
@echo "Created 'dist/cf-extension-api.*'"
styles:
@mkdir -p dist
stylus \
--use nib \
--sourcemap \
lib/style/index.styl \
--out dist/cf-extension.css
# Build API and Styleguide
build-with-docs: build styleguide
styleguide: styles
@mkdir -p dist/styleguide
kss-node --config kss-config.json
cp ./lib/style/styleguide.css ./dist/styleguide/styleguide.css
watch:
webpack --watch
lint:
eslint lib/ bin/ test/
test:
karma start --single-run
ci: test lint
clean:
rm -rf dist/*
build-pages: build-with-docs
cp -r dist/styleguide docs