From c44e3ecb40dd6345c64194f6bbfbb1ae93e99caf Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Sun, 8 May 2016 11:09:34 +0200 Subject: [PATCH] include settings in lib --- example/app.js | 6 ++---- src/index.js | 4 +++- {settings => src/settings}/printer_settings.json | 0 {settings => src/settings}/user_settings.json | 0 4 files changed, 5 insertions(+), 5 deletions(-) rename {settings => src/settings}/printer_settings.json (100%) rename {settings => src/settings}/user_settings.json (100%) diff --git a/example/app.js b/example/app.js index a5bbfbe..75f8c9d 100644 --- a/example/app.js +++ b/example/app.js @@ -1,11 +1,9 @@ import THREE from 'three.js'; -import PRINTER_SETTINGS from 'settings/printer_settings.json!'; -import USER_SETTINGS from 'settings/user_settings.json!'; import * as SLICER from 'src/index'; var settings = new SLICER.Settings(); -settings.updateConfig(PRINTER_SETTINGS["ultimaker2go"]); -settings.updateConfig(USER_SETTINGS); +settings.updateConfig(SLICER.printerSettings['ultimaker2go']); +settings.updateConfig(SLICER.userSettings); var geometry = new THREE.TorusGeometry(20, 10, 30, 30); diff --git a/src/index.js b/src/index.js index a380993..f9fca83 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,6 @@ import Slicer from './slicer.js'; import Settings from './settings.js'; +import printerSettings from './settings/printer_settings.json!'; +import userSettings from './settings/user_settings.json!'; -export { Slicer, Settings }; +export { Slicer, Settings, printerSettings, userSettings }; diff --git a/settings/printer_settings.json b/src/settings/printer_settings.json similarity index 100% rename from settings/printer_settings.json rename to src/settings/printer_settings.json diff --git a/settings/user_settings.json b/src/settings/user_settings.json similarity index 100% rename from settings/user_settings.json rename to src/settings/user_settings.json