move example

This commit is contained in:
casperlamboo 2017-11-16 22:40:39 +01:00
parent 2c2bbeda53
commit 2d0f628743
13 changed files with 3597 additions and 5911 deletions

4
.gitignore vendored
View File

@ -1,10 +1,8 @@
*.DS_Store *.DS_Store
jspm_package
node_modules node_modules
lib lib
module module
dist dist

View File

@ -1,4 +1,2 @@
node_modules node_modules
jspm_packages jspm_packages
example
simpleExample

5812
example/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +0,0 @@
{
"name": "doodle3d-simple-example",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack -p",
"start": "webpack-dev-server -w"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel-polyfill": "^6.23.0",
"file-saver": "^1.3.3",
"html-webpack-template": "^6.0.2",
"imports-loader": "^0.7.1",
"material-ui": "^0.19.4",
"react": "^16.1.0",
"react-dom": "^16.1.0",
"react-tap-event-plugin": "^3.0.2",
"three": "^0.83.0",
"url-loader": "^0.5.9"
},
"devDependencies": {
"babel-plugin-transform-runtime": "^6.23.0",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-latest": "^6.24.1",
"html-webpack-plugin": "^2.29.0",
"webpack": "^3.3.0",
"webpack-dev-server": "^2.5.1",
"worker-loader": "^0.8.1",
"yml-loader": "^2.1.0"
}
}

View File

@ -15,7 +15,7 @@ document.body.style.height = '100%';
document.documentElement.style.height = '100%' document.documentElement.style.height = '100%'
document.getElementById('app').style.height = '100%'; document.getElementById('app').style.height = '100%';
const downloadGCode = gcode => { const downloadGCode = ({ gcode: { gcode } }) => {
const file = new File([gcode], 'gcode.gcode', { type: 'text/plain' }); const file = new File([gcode], 'gcode.gcode', { type: 'text/plain' });
fileSaver.saveAs(file); fileSaver.saveAs(file);
}; };

3634
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@
"module": "module/index.js", "module": "module/index.js",
"esnext": "src/index.js", "esnext": "src/index.js",
"scripts": { "scripts": {
"start": "webpack-dev-server -w",
"prepare": "npm run build", "prepare": "npm run build",
"build": "npm run build:main && npm run build:main:settings && npm run build:module && npm run build:module:settings ", "build": "npm run build:main && npm run build:main:settings && npm run build:module && npm run build:module:settings ",
"build:main": "BABEL_ENV=main babel src -s -d lib", "build:main": "BABEL_ENV=main babel src -s -d lib",
@ -37,7 +38,20 @@
"babel-core": "6.24.1", "babel-core": "6.24.1",
"babel-loader": "7.0.0", "babel-loader": "7.0.0",
"babel-plugin-add-module-exports": "0.2.1", "babel-plugin-add-module-exports": "0.2.1",
"babel-preset-es2015": "6.24.1" "babel-preset-es2015": "6.24.1",
"babel-polyfill": "^6.23.0",
"file-saver": "^1.3.3",
"html-webpack-template": "^6.0.2",
"imports-loader": "^0.7.1",
"material-ui": "^0.19.4",
"react-tap-event-plugin": "^3.0.2",
"url-loader": "^0.5.9",
"babel-plugin-transform-runtime": "^6.23.0",
"html-webpack-plugin": "^2.29.0",
"webpack": "^3.3.0",
"webpack-dev-server": "^2.5.1",
"worker-loader": "^0.8.1",
"yml-loader": "^2.1.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -26,7 +26,7 @@ module.exports = {
}, },
resolve: { resolve: {
alias: { alias: {
'doodle3d-slicer': path.resolve(__dirname, '../src/index.js'), 'doodle3d-slicer': path.resolve(__dirname, 'src/'),
'clipper-lib': '@doodle3d/clipper-lib', 'clipper-lib': '@doodle3d/clipper-lib',
'clipper-js': '@doodle3d/clipper-js' 'clipper-js': '@doodle3d/clipper-js'
} }