diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..afa02a3a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "useTabs": true, + "tabWidth": 4, + "semi": true, + "singleQuote": true, + "printWidth": 150, +} diff --git a/Makefile b/Makefile index 2e6a838b..f7bf95f9 100644 --- a/Makefile +++ b/Makefile @@ -107,6 +107,9 @@ dev: $(DEMO) format: clang-format -i $(LIBRARY_SOURCES) $(DEMO_SOURCES) $(GLTFPACK_SOURCES) +formatjs: + prettier -w js/*.js gltf/*.js demo/*.html js/*.ts + js: js/meshopt_decoder.js js/meshopt_decoder.module.js js/meshopt_encoder.js js/meshopt_encoder.module.js js/meshopt_simplifier.js js/meshopt_simplifier.module.js symbols: $(BUILD)/amalgamated.so