2018-01-20 08:01:41 +00:00
|
|
|
/**
|
|
|
|
* dat-gui JavaScript Controller Library
|
2020-04-04 05:34:41 +00:00
|
|
|
* https://github.com/dataarts/dat.gui
|
2018-01-20 08:01:41 +00:00
|
|
|
*
|
|
|
|
* Copyright 2011 Data Arts Team, Google Creative Lab
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
import fs from 'fs';
|
|
|
|
import path from 'path';
|
|
|
|
import resolve from 'rollup-plugin-node-resolve';
|
|
|
|
import cleanup from 'rollup-plugin-cleanup';
|
|
|
|
import babel from 'rollup-plugin-babel';
|
|
|
|
import sass from 'rollup-plugin-sass';
|
|
|
|
|
|
|
|
const banner = fs.readFileSync(path.join(__dirname, 'licenseBanner.txt'));
|
|
|
|
|
|
|
|
export default {
|
|
|
|
input: 'src/dat/index.js',
|
|
|
|
output: [{
|
2018-05-05 22:13:44 +00:00
|
|
|
// TODO: Remove default exports, and this line, in v0.8.0.
|
2018-05-01 05:21:34 +00:00
|
|
|
exports: 'named',
|
2018-01-20 08:01:41 +00:00
|
|
|
file: './build/dat.gui.js',
|
|
|
|
format: 'umd',
|
|
|
|
name: 'dat',
|
2018-01-21 00:18:04 +00:00
|
|
|
sourcemap: true,
|
2018-01-20 08:01:41 +00:00
|
|
|
banner: banner
|
|
|
|
}, {
|
|
|
|
file: './build/dat.gui.module.js',
|
|
|
|
format: 'es',
|
2018-01-21 00:18:04 +00:00
|
|
|
sourcemap: true,
|
2018-01-20 08:01:41 +00:00
|
|
|
banner: banner
|
|
|
|
}],
|
|
|
|
watch: {
|
|
|
|
include: 'src/**'
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
resolve(),
|
2018-01-20 08:18:25 +00:00
|
|
|
sass({
|
2018-01-21 00:18:04 +00:00
|
|
|
insert: true,
|
2018-01-20 08:18:25 +00:00
|
|
|
output: 'build/dat.gui.css',
|
2023-06-27 16:03:58 +00:00
|
|
|
options: { outputStyle: 'compressed' }
|
2018-01-20 08:18:25 +00:00
|
|
|
}),
|
2018-01-20 08:01:41 +00:00
|
|
|
babel({
|
|
|
|
plugins: ['external-helpers'],
|
|
|
|
exclude: 'node_modules/**'
|
|
|
|
}),
|
|
|
|
cleanup()
|
|
|
|
]
|
|
|
|
};
|