[build][js] build graph rules for JS