File: rules

package info (click to toggle)
node-react-toastify 9.1.2%2B~1.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,088 kB
  • sloc: javascript: 260; makefile: 28
file content (37 lines) | stat: -rwxr-xr-x 1,716 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

ROLLUP_PLUGINS=-p @rollup/plugin-babel -p rollup-plugin-typescript -p rollup-plugin-terser
ES_FILE=$(shell pkgjs-pjson . exports . import)
CJS_FILE=$(shell pkgjs-pjson . exports . require)
ADDON_ES=$(shell pkgjs-pjson . exports ./addons/use-notification-center import)
ADDON_CJS=$(shell pkgjs-pjson . exports ./addons/use-notification-center require)

%:
	dh $@

override_dh_auto_build:
	dh_auto_build --buildsystem=nodejs
	rollup $(ROLLUP_PLUGINS) --external react,clsx -f es -o $(ES_FILE) src/index.ts
	rollup $(ROLLUP_PLUGINS) --external react,clsx -f cjs -o $(CJS_FILE) src/index.ts
	tsc -d
	rollup $(ROLLUP_PLUGINS) --external react,clsx -f es -o $(ADDON_ES) src/addons/use-notification-center/index.ts
	rollup $(ROLLUP_PLUGINS) --external react,clsx -f cjs -o $(ADDON_CJS) src/addons/use-notification-center/index.ts
	ln -s .. node_modules/react-toastify
	tsc -p debian/addon-tsconfig.json --target ES5
	mv addons/addons/use-notification-center/*.d.ts addons/use-notification-center/
	rm -rf addons/addons node_modules/react-toastify
	node-sass scss/main.scss dist/ReactToastify.css
	node-sass scss/minimal.scss dist/ReactToastify.minimal.css
	postcss dist/ReactToastify.css --use autoprefixer -m -o dist/ReactToastify.css
	postcss dist/ReactToastify.minimal.css --use autoprefixer -m -o  dist/_ReactToastify.minimal.css
	yui-compressor dist/_ReactToastify.minimal.css > dist/ReactToastify.minimal.css
	rm -f dist/_ReactToastify.minimal.css dist/_ReactToastify.minimal.css.map
	yui-compressor dist/ReactToastify.css > dist/ReactToastify.min.css

override_dh_installdocs:
	dh_installdocs
	dh_nodejs_autodocs