forked from the-metalworks/cosmere-rpg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
47 lines (43 loc) · 1.34 KB
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// rollup.config.js
import typescript from '@rollup/plugin-typescript';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import copy from 'rollup-plugin-copy';
import commonjs from '@rollup/plugin-commonjs';
import scss from 'rollup-plugin-scss';
export default {
input: './src/index.ts',
output: {
dir: 'build',
format: 'es',
// Removes the hash from the asset filename
assetFileNames: '[name][extname]',
},
plugins: [
// CSS
scss(),
// Typescript
nodeResolve({ preferBuiltins: true }),
typescript(),
commonjs(),
// Copy system.json & templates
copy({
targets: [
{ src: 'src/system.json', dest: 'build' },
{ src: 'src/templates/*.hbs', dest: 'build/templates/' },
{
src: 'src/templates/actors/*.hbs',
dest: 'build/templates/actors/',
},
{
src: 'src/templates/roll/*.hbs',
dest: 'build/templates/roll/',
},
{
src: 'src/templates/item/dialog/*.hbs',
dest: 'build/templates/item/dialog/',
},
{ src: 'src/lang/*.json', dest: 'build/lang/' }
],
}),
],
};