Skip to content

Commit

Permalink
refactor: Replace to v0.13.0-beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
ahomu committed May 14, 2018
1 parent 694f88e commit aee9c94
Show file tree
Hide file tree
Showing 68 changed files with 42,524 additions and 2,635 deletions.
8 changes: 0 additions & 8 deletions .babelrc

This file was deleted.

13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

208 changes: 0 additions & 208 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
node_modules
yarn-error.log
temp
1 change: 1 addition & 0 deletions .prettierignore
@@ -0,0 +1 @@
dist
78 changes: 78 additions & 0 deletions Makefile
@@ -0,0 +1,78 @@
#MAKEFLAGS = -j1

NODE_BIN := node
NPM_MOD_DIR := $(CURDIR)/node_modules
NPM_BIN_DIR := $(NPM_MOD_DIR)/.bin
WEBCOMPONENTS_DIR := $(NPM_MOD_DIR)/@webcomponents/webcomponentsjs

DIST_DIR := ./dist

.DEFAULT_GOAL := help

# Self-Documented Makefile
# ref. https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html

.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@exit 1 ## I'd like to notice to fail if user call 'make' without any target.

# Dev

.PHONY: build
build: format clean rollup postcss theme-default copy-webcomponentsjs ## Build All

.PHONY: dev
dev: ## Incremental Build All
$(MAKE) copy-webcomponentsjs
$(MAKE) -j rollup-watch postcss-watch theme-default-watch serve

.PHONY: serve
serve: ## Serve file
python -m SimpleHTTPServer

# Build

.PHONY: rollup
rollup:
$(NPM_BIN_DIR)/rollup --config ./rollup.config.js

.PHONY: rollup-watch
rollup-watch:
$(NPM_BIN_DIR)/rollup --config ./rollup.config.js --watch

.PHONY: copy-webcomponentsjs
copy-webcomponentsjs:
cp $(WEBCOMPONENTS_DIR)/webcomponents-hi.js ./dist
cp $(WEBCOMPONENTS_DIR)/webcomponents-hi-ce.js ./dist
cp $(WEBCOMPONENTS_DIR)/webcomponents-hi-sd.js ./dist
cp $(WEBCOMPONENTS_DIR)/webcomponents-hi-sd-ce.js ./dist
cp $(WEBCOMPONENTS_DIR)/webcomponents-lite.js ./dist
cp $(WEBCOMPONENTS_DIR)/webcomponents-loader.js ./dist
cp $(WEBCOMPONENTS_DIR)/webcomponents-sd-ce.js ./dist

.PHONY: postcss
postcss:
$(NPM_BIN_DIR)/postcss --output ./dist/talkie.css ./src/style/index.css --verbose

.PHONY: postcss-watch
postcss-watch:
$(NPM_BIN_DIR)/postcss --output ./dist/talkie.css ./src/style/index.css --verbose --watch

.PHONY: theme-default
theme-default:
$(NPM_BIN_DIR)/postcss --output ./dist/talkie.theme-default.css ./src/theme/default/index.css --verbose

.PHONY: theme-default-watch
theme-default-watch:
$(NPM_BIN_DIR)/postcss --output ./dist/talkie.theme-default.css ./src/theme/default/index.css --verbose --watch

# Utilities

.PHONY: format
format: ## Auto formatting
$(NPM_BIN_DIR)/prettier --config ./prettier.config.js --write './**/*.+(ts|js)'

.PHONY: clean
clean: ## Clean distribution dir
rm -rf $(DIST_DIR)
1 change: 0 additions & 1 deletion dist/talkie-default.min.css

This file was deleted.

1 change: 1 addition & 0 deletions dist/talkie.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aee9c94

Please sign in to comment.