mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Add named exports.
`import dat from 'dat.gui'` is now interchangeable with `import * as dat from 'dat.gui'`
This commit is contained in:
parent
4a08249e30
commit
fdcd266249
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
build/dat.gui.min.js
vendored
2
build/dat.gui.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -44,7 +44,7 @@
|
||||
"rollup-plugin-node-resolve": "^3.0.2",
|
||||
"rollup-plugin-sass": "^0.5.3",
|
||||
"rollup-plugin-uglify": "^2.0.1",
|
||||
"serve": "^6.4.8"
|
||||
"serve": "^6.4.8 <6.5.4"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "airbnb-base",
|
||||
|
@ -23,6 +23,7 @@ const banner = fs.readFileSync(path.join(__dirname, 'licenseBanner.txt'));
|
||||
export default {
|
||||
input: 'src/dat/index.js',
|
||||
output: [{
|
||||
exports: 'named',
|
||||
file: './build/dat.gui.js',
|
||||
format: 'umd',
|
||||
name: 'dat',
|
||||
|
1
rollup.config.min.js
vendored
1
rollup.config.min.js
vendored
@ -20,6 +20,7 @@ const banner = fs.readFileSync(path.join(__dirname, 'licenseBanner.txt'));
|
||||
|
||||
export default Object.assign({}, defaultConfig, {
|
||||
output: {
|
||||
exports: 'named',
|
||||
file: './build/dat.gui.min.js',
|
||||
format: 'umd',
|
||||
name: 'dat',
|
||||
|
@ -25,17 +25,16 @@ import NumberControllerSlider from './controllers/NumberControllerSlider';
|
||||
import FunctionController from './controllers/FunctionController';
|
||||
import ColorController from './controllers/ColorController';
|
||||
|
||||
import dom from './dom/dom';
|
||||
import GUI from './gui/GUI';
|
||||
import domImport from './dom/dom';
|
||||
import GUIImport from './gui/GUI';
|
||||
|
||||
export default {
|
||||
color: {
|
||||
export const color = {
|
||||
Color: Color,
|
||||
math: math,
|
||||
interpret: interpret
|
||||
},
|
||||
};
|
||||
|
||||
controllers: {
|
||||
export const controllers = {
|
||||
Controller: Controller,
|
||||
BooleanController: BooleanController,
|
||||
OptionController: OptionController,
|
||||
@ -45,15 +44,18 @@ export default {
|
||||
NumberControllerSlider: NumberControllerSlider,
|
||||
FunctionController: FunctionController,
|
||||
ColorController: ColorController
|
||||
},
|
||||
|
||||
dom: {
|
||||
dom: dom
|
||||
},
|
||||
|
||||
gui: {
|
||||
GUI: GUI
|
||||
},
|
||||
|
||||
GUI: GUI
|
||||
};
|
||||
|
||||
export const dom = { dom: domImport };
|
||||
|
||||
export const gui = { GUI: GUIImport };
|
||||
|
||||
export const GUI = GUIImport;
|
||||
|
||||
export default {
|
||||
color,
|
||||
controllers,
|
||||
dom,
|
||||
gui,
|
||||
GUI
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user