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-node-resolve": "^3.0.2",
|
||||||
"rollup-plugin-sass": "^0.5.3",
|
"rollup-plugin-sass": "^0.5.3",
|
||||||
"rollup-plugin-uglify": "^2.0.1",
|
"rollup-plugin-uglify": "^2.0.1",
|
||||||
"serve": "^6.4.8"
|
"serve": "^6.4.8 <6.5.4"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": "airbnb-base",
|
"extends": "airbnb-base",
|
||||||
|
@ -23,6 +23,7 @@ const banner = fs.readFileSync(path.join(__dirname, 'licenseBanner.txt'));
|
|||||||
export default {
|
export default {
|
||||||
input: 'src/dat/index.js',
|
input: 'src/dat/index.js',
|
||||||
output: [{
|
output: [{
|
||||||
|
exports: 'named',
|
||||||
file: './build/dat.gui.js',
|
file: './build/dat.gui.js',
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
name: 'dat',
|
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, {
|
export default Object.assign({}, defaultConfig, {
|
||||||
output: {
|
output: {
|
||||||
|
exports: 'named',
|
||||||
file: './build/dat.gui.min.js',
|
file: './build/dat.gui.min.js',
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
name: 'dat',
|
name: 'dat',
|
||||||
|
@ -25,17 +25,16 @@ import NumberControllerSlider from './controllers/NumberControllerSlider';
|
|||||||
import FunctionController from './controllers/FunctionController';
|
import FunctionController from './controllers/FunctionController';
|
||||||
import ColorController from './controllers/ColorController';
|
import ColorController from './controllers/ColorController';
|
||||||
|
|
||||||
import dom from './dom/dom';
|
import domImport from './dom/dom';
|
||||||
import GUI from './gui/GUI';
|
import GUIImport from './gui/GUI';
|
||||||
|
|
||||||
export default {
|
export const color = {
|
||||||
color: {
|
|
||||||
Color: Color,
|
Color: Color,
|
||||||
math: math,
|
math: math,
|
||||||
interpret: interpret
|
interpret: interpret
|
||||||
},
|
};
|
||||||
|
|
||||||
controllers: {
|
export const controllers = {
|
||||||
Controller: Controller,
|
Controller: Controller,
|
||||||
BooleanController: BooleanController,
|
BooleanController: BooleanController,
|
||||||
OptionController: OptionController,
|
OptionController: OptionController,
|
||||||
@ -45,15 +44,18 @@ export default {
|
|||||||
NumberControllerSlider: NumberControllerSlider,
|
NumberControllerSlider: NumberControllerSlider,
|
||||||
FunctionController: FunctionController,
|
FunctionController: FunctionController,
|
||||||
ColorController: ColorController
|
ColorController: ColorController
|
||||||
},
|
};
|
||||||
|
|
||||||
dom: {
|
export const dom = { dom: domImport };
|
||||||
dom: dom
|
|
||||||
},
|
export const gui = { GUI: GUIImport };
|
||||||
|
|
||||||
gui: {
|
export const GUI = GUIImport;
|
||||||
GUI: GUI
|
|
||||||
},
|
export default {
|
||||||
|
color,
|
||||||
GUI: GUI
|
controllers,
|
||||||
|
dom,
|
||||||
|
gui,
|
||||||
|
GUI
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user