title: Solidity: How to compile multiple smart contracts in compile.js file?
body: <p>I would like to compile multiple contracts in one compile.js file but I'm not sure how to do it. </p>
  
  <p>My compile.js file with a single contract looks like this: </p>
  
  <pre><code>const path = require('path');
  const fs = require('fs');
  const solc = require('solc');
  
  const lotteryPath = path.resolve(__dirname, 'contracts', 'Lottery.sol');
  
  const source = fs.readFileSync(lotteryPath, 'utf8');
  
  module.exports = solc.compile(source, 1);
  </code></pre>
  
  <p>How can I add more contracts to the compile.js file? I understand that the 1 must be changed to the number of contracts, but not sure what else is required?</p>