You can use the tonweb-contract component of the TonWeb package.
First, create your contract class:
import {Contract} from 'web3-eth-contract';
export class MyContract extends Contract {
constructor(provider, options) {
// insert the bytes of your code here
options.code = hexToBytes('abcd..');
super(provider, options);
// add definitions of the functions of the contract
this.method.myMethod = ...
}
// @override
createDataCell() {
}
// @override
createSigningMessage(options) {
}
}
Later you can deploy with an instance of the contract:
const contract = new MyContract(provider, options)
const deployMethod = contract.deploy(keyPair.secretKey);
await deployMethod.send();