UNPKG

562 BJavaScriptView Raw
1const fs = require('fs');
2const path = require('path');
3
4const cwd = process.cwd();
5const isTS = fs.existsSync(path.join(cwd, 'tsconfig.json'));
6
7const scripts = {
8 'mount:public': 'mount public --to /',
9 'mount:web_modules': 'mount web_modules',
10 'mount:src': 'mount src --to /_dist_',
11};
12
13if (isTS) {
14 scripts['run:tsc'] = 'tsc --noEmit';
15 scripts['run:tsc::watch'] = '$1 --watch';
16}
17
18module.exports = {
19 scripts,
20 devOptions: {},
21 installOptions: {
22 installTypes: isTS,
23 },
24 plugins: ['@snowpack/plugin-babel', '..'],
25};