Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 ROLLUP_PLUGINS=-p @rollup/plugin-babel -p @rollup/plugin-typescript -p rollup-plugin-terser
8 # For the addon build the main tsconfig.json excludes src/addons, so @rollup/plugin-typescript
9 # never emits those files. Disable tsconfig loading for that run.
10 ADDON_ROLLUP_PLUGINS=-p @rollup/plugin-babel -p "@rollup/plugin-typescript={tsconfig:false}" -p rollup-plugin-terser
11 ES_FILE=$(shell pkgjs-pjson . exports . import)
12 CJS_FILE=$(shell pkgjs-pjson . exports . require)
13 ADDON_ES=$(shell pkgjs-pjson . exports ./addons/use-notification-center import)
14 ADDON_CJS=$(shell pkgjs-pjson . exports ./addons/use-notification-center require)
15
16 %:
17 dh $@
18
19 override_dh_auto_build:
20 dh_auto_build --buildsystem=nodejs
21 rollup $(ROLLUP_PLUGINS) --external react,clsx -f es -o $(ES_FILE) src/index.ts
22 rollup $(ROLLUP_PLUGINS) --external react,clsx -f cjs -o $(CJS_FILE) src/index.ts
23 tsc -d
24 rollup $(ADDON_ROLLUP_PLUGINS) --external react,react-toastify,clsx -f es -o $(ADDON_ES) src/addons/use-notification-center/index.ts
25 rollup $(ADDON_ROLLUP_PLUGINS) --external react,react-toastify,clsx -f cjs -o $(ADDON_CJS) src/addons/use-notification-center/index.ts
26 ln -s .. node_modules/react-toastify
27 tsc -p debian/addon-tsconfig.json --target ES5
28 mv addons/addons/use-notification-center/*.d.ts addons/use-notification-center/
29 rm -rf addons/addons node_modules/react-toastify
30 node-sass scss/main.scss dist/ReactToastify.css
31 node-sass scss/minimal.scss dist/ReactToastify.minimal.css
32 postcss dist/ReactToastify.css --use autoprefixer -m -o dist/ReactToastify.css
33 postcss dist/ReactToastify.minimal.css --use autoprefixer -m -o dist/_ReactToastify.minimal.css
34 yui-compressor dist/_ReactToastify.minimal.css > dist/ReactToastify.minimal.css
35 rm -f dist/_ReactToastify.minimal.css dist/_ReactToastify.minimal.css.map
36 yui-compressor dist/ReactToastify.css > dist/ReactToastify.min.css
37
38 override_dh_installdocs:
39 dh_installdocs
40 dh_nodejs_autodocs