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