(options)
| 140 | * @param {Object} [options] - optional esbuild options |
| 141 | */ |
| 142 | export function runBuild(options) { |
| 143 | return build({ |
| 144 | // default options |
| 145 | ...{ |
| 146 | color: true, |
| 147 | bundle: true, |
| 148 | minify: argv.minify || false, |
| 149 | minifySyntax: true, |
| 150 | target: 'es2018', |
| 151 | sourcemap: true, |
| 152 | logLevel: 'error', |
| 153 | // packages: 'external', // check SortableJS |
| 154 | }, |
| 155 | |
| 156 | // merge any optional esbuild options |
| 157 | ...options, |
| 158 | }).catch(() => { |
| 159 | // don't do anything when an error occured, this is to avoid watch mode to crash on errors |
| 160 | // console.error('esbuild error: ', err); |
| 161 | }); |
| 162 | } |
| 163 | |
| 164 | // -- |
| 165 | // SASS related methods |
no outgoing calls
no test coverage detected