The HM-10 actually uses the cc2541, so if you could run the HM-10 firmware on your cc2541 then you could communicate with it via serial in the same way.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I haven't heard of anyone doing it directly, but I think it depends on the firmware in the cc2541.
To get BLE on the Espruino Board you can use an HM-10 module: https://www.espruino.com/Bluetooth+BLE
It's not very well documented, but it does work.
The HM-10 actually uses the cc2541, so if you could run the HM-10 firmware on your cc2541 then you could communicate with it via serial in the same way.