1
0
Fork 0

🚧 Work on FCP

This commit is contained in:
Joost De Cock 2019-05-02 18:13:10 +02:00
parent 6f77c4bdce
commit f27cddfdff
12 changed files with 99 additions and 96 deletions

View file

@ -7,8 +7,20 @@
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-scripts": "2.0.4",
"freesewing": "^0.30.6",
"{{name}}": "{{#if yarn}}link:..{{else}}file:..{{/if}}"
"@freesewing/core": "^{{version}}",
"@freesewing/plugin-bundle": "^{{version}}",
"@freesewing/plugin-bust": "^{{version}}",
"@freesewing/plugin-buttons": "^{{version}}",
"@freesewing/plugin-flip": "^{{version}}",
"@freesewing/plugin-debug": "^{{version}}",
"@freesewing/plugin-theme": "^{{version}}",
"@freesewing/plugin-designer": "^{{version}}",
"@freesewing/i18n": "^{{version}}",
"@freesewing/components": "^{{version}}",
"@freesewing/css-theme": "^{{version}}",
"@freesewing/mui-theme": "^{{version}}",
"typeface-roboto-condensed": "^0.0.54",
"pattern": "{{#if yarn}}link:..{{else}}file:..{{/if}}"
},
"scripts": {
"start": "react-scripts start",

View file

@ -1,14 +1,18 @@
import React, { Component } from "react";
import freesewing from "freesewing";
import freesewing from "@freesewing/core";
import { Workbench } from "@freesewing/components";
import "typeface-roboto-condensed";
import "@freesewing/css-theme";
import "./App.css";
import ExampleComponent from "{{name}}";
import Pattern from "pattern";
class App extends Component {
render() {
console.log(freesewing);
console.log({ ExampleComponent });
return <p>hi there</p>;
console.log({ Pattern });
return <Workbench />;
}
}

View file

@ -47,19 +47,19 @@
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@freesewing/core": "2.0.0-alpha.3",
"@freesewing/plugin-bundle": "2.0.0-alpha.3",
"@freesewing/components": "2.0.0-alpha.3",
"@freesewing/css-theme": "2.0.0-alpha.3",
"@freesewing/i18n": "2.0.0-alpha.3",
"@freesewing/mui-theme": "2.0.0-alpha.3",
"@freesewing/patterns": "2.0.0-alpha.3",
"@freesewing/plugin-bust": "2.0.0-alpha.3",
"@freesewing/plugin-buttons": "2.0.0-alpha.3",
"@freesewing/plugin-debug": "2.0.0-alpha.3",
"@freesewing/plugin-designer": "2.0.0-alpha.3",
"@freesewing/plugin-flip": "2.0.0-alpha.3",
"@freesewing/utils": "2.0.0-alpha.3",
"@freesewing/core": "^2.0.0-alpha.3",
"@freesewing/plugin-bundle": "^2.0.0-alpha.3",
"@freesewing/components": "^2.0.0-alpha.3",
"@freesewing/css-theme": "^2.0.0-alpha.3",
"@freesewing/i18n": "^2.0.0-alpha.3",
"@freesewing/mui-theme": "^2.0.0-alpha.3",
"@freesewing/patterns": "^2.0.0-alpha.3",
"@freesewing/plugin-bust": "^2.0.0-alpha.3",
"@freesewing/plugin-buttons": "^2.0.0-alpha.3",
"@freesewing/plugin-debug": "^2.0.0-alpha.3",
"@freesewing/plugin-designer": "^2.0.0-alpha.3",
"@freesewing/plugin-flip": "^2.0.0-alpha.3",
"@freesewing/utils": "^2.0.0-alpha.3",
"@svgr/rollup": "^2.4.1",
"babel-eslint": "^10.0.1",
"cross-env": "^5.1.4",

View file

@ -1,69 +1,12 @@
/*
* This file was created by create-freesewing-pattern
* -> https://github.com/freesewing/create-freesewing-pattern
*
* Freesewing documentation:
* -> https://beta.freesewing.org/en/docs/developer
*
* Freesewing help & advice:
* -> https://gitter.im/freesewing/freesewing
*/
import freesewing from "freesewing";
import freesewing from "@freesewing/core";
import plugins from "@freesewing/plugins";
import config from "../config";
/*
* Our most popular plugins are part of the plugin bundle
* which is already installed and imported.
* If you need additional plugins, you should install and
* import them.
*
* A list of all plugins is available at:
* -> https://beta.freesewing.org/en/docs/developer/plugins
*/
import plugins from "@freesewing/plugin-bundle";
// import buttons from "@freesewing/plugin-buttons";
/*
* If you want to extend an existing pattern, you should
* install it as a dev-dependency, and then import it.
*
* A list of all patterns is available at:
* -> https://beta.freesewing.org/en/patterns
*/
//import Brian from "@freesewing/brian";
/*
* It's a best practice to put each pattern part in its own file:
* -> https://beta.freesewing.org/en/docs/developer/do
*/
import draftBox from "./box";
/* Create new design*/
const {{name}} = new freesewing.Design(config, [
plugins,
//buttons
]);
// Create new design
const Pattern = new freesewing.Design(config, plugins);
/*
* If you want to extend an existing pattern, you should
* attach those draft methods you need to the design prototype
* as such:
*/
//{{name}}.prototype.draftBrianBase = function(part) {
// return new Brian(this.settings).draftBase(part);
//};
//{{name}}.prototype.draftBrianBack = function(part) {
// return new Brian(this.settings).draftBack(part);
//};
//{{name}}.prototype.draftBrianFront = function(part) {
// return new Brian(this.settings).draftFront(part);
//};
// Attach the draft methods to the prototype
Pattern.prototype.draftBox = draftBox;
/*
* Attach the draft methods of your own parts to the
* design prototype as such:
*/
{{name}}.prototype.draftBox = draftBox;
// Export your design
export default {{name}};
export default Pattern;