🚧 Work on FCP
This commit is contained in:
parent
6f77c4bdce
commit
f27cddfdff
12 changed files with 99 additions and 96 deletions
|
@ -4,6 +4,7 @@
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const chalk = require("chalk");
|
const chalk = require("chalk");
|
||||||
const program = require("commander");
|
const program = require("commander");
|
||||||
|
const strings = require("@freesewing/i18n").strings;
|
||||||
const { version } = require("../package");
|
const { version } = require("../package");
|
||||||
|
|
||||||
const getDefaultLibraryParams = require("./get-default-library-params");
|
const getDefaultLibraryParams = require("./get-default-library-params");
|
||||||
|
@ -50,7 +51,8 @@ module.exports = async () => {
|
||||||
template: program.template,
|
template: program.template,
|
||||||
templatePath: program.templatePath,
|
templatePath: program.templatePath,
|
||||||
skipPrompts: program.skipPrompts,
|
skipPrompts: program.skipPrompts,
|
||||||
git: program.git
|
git: program.git,
|
||||||
|
version
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.keys(opts).forEach(key => {
|
Object.keys(opts).forEach(key => {
|
||||||
|
@ -71,18 +73,27 @@ module.exports = async () => {
|
||||||
const dest = await createLibrary(params);
|
const dest = await createLibrary(params);
|
||||||
|
|
||||||
console.log(`
|
console.log(`
|
||||||
|
🎉 ${strings[params.language]["cfp.patternCreated"]} ${chalk.bold(dest)}
|
||||||
|
|
||||||
Your pattern skeleton has been created at ${dest}.
|
${strings[params.language]["cfp.runTheseCommands"]}:
|
||||||
|
|
||||||
Before you start hacking, run these two commands, each in their own terminal:
|
- ${strings[params.language]["cfp.startRollup"]}
|
||||||
|
|
||||||
In one terminal, start the rollup bundler in watch mode:
|
👉 ${chalk.cyan(`cd ${params.shortName} && ${params.manager} start`)}
|
||||||
$ ${chalk.cyan(`cd ${params.shortName} && ${params.manager} start`)}
|
|
||||||
|
|
||||||
And in another terminal, run the dev server:
|
- ${strings[params.language]["cfp.startWebpack"]}
|
||||||
$ ${chalk.cyan(
|
|
||||||
|
👉 ${chalk.cyan(
|
||||||
`cd ${path.join(params.shortName, "example")} && ${params.manager} start`
|
`cd ${path.join(params.shortName, "example")} && ${params.manager} start`
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
${strings[params.language]["cfp.devDocsAvailableAt"]}
|
||||||
|
${chalk.bold("https://" + params.language + ".freesewing.dev/")}
|
||||||
|
|
||||||
|
${strings[params.language]["cfp.talkToUs"]}
|
||||||
|
${chalk.bold("https://gitter.im/freesewing/freesewing")}
|
||||||
|
|
||||||
`);
|
`);
|
||||||
|
|
||||||
return dest;
|
return dest;
|
||||||
|
|
|
@ -123,7 +123,8 @@ module.exports = async opts => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...info,
|
...info,
|
||||||
git: opts.git
|
git: opts.git,
|
||||||
|
version: opts.version
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,8 +7,20 @@
|
||||||
"react": "^16.5.2",
|
"react": "^16.5.2",
|
||||||
"react-dom": "^16.5.2",
|
"react-dom": "^16.5.2",
|
||||||
"react-scripts": "2.0.4",
|
"react-scripts": "2.0.4",
|
||||||
"freesewing": "^0.30.6",
|
"@freesewing/core": "^{{version}}",
|
||||||
"{{name}}": "{{#if yarn}}link:..{{else}}file:..{{/if}}"
|
"@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": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
import React, { Component } from "react";
|
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 "./App.css";
|
||||||
|
|
||||||
import ExampleComponent from "{{name}}";
|
import Pattern from "pattern";
|
||||||
|
|
||||||
class App extends Component {
|
class App extends Component {
|
||||||
render() {
|
render() {
|
||||||
console.log(freesewing);
|
console.log(freesewing);
|
||||||
console.log({ ExampleComponent });
|
console.log({ Pattern });
|
||||||
return <p>hi there</p>;
|
return <Workbench />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,19 +47,19 @@
|
||||||
"@babel/plugin-syntax-import-meta": "^7.0.0",
|
"@babel/plugin-syntax-import-meta": "^7.0.0",
|
||||||
"@babel/preset-env": "^7.0.0",
|
"@babel/preset-env": "^7.0.0",
|
||||||
"@babel/preset-react": "^7.0.0",
|
"@babel/preset-react": "^7.0.0",
|
||||||
"@freesewing/core": "2.0.0-alpha.3",
|
"@freesewing/core": "^2.0.0-alpha.3",
|
||||||
"@freesewing/plugin-bundle": "2.0.0-alpha.3",
|
"@freesewing/plugin-bundle": "^2.0.0-alpha.3",
|
||||||
"@freesewing/components": "2.0.0-alpha.3",
|
"@freesewing/components": "^2.0.0-alpha.3",
|
||||||
"@freesewing/css-theme": "2.0.0-alpha.3",
|
"@freesewing/css-theme": "^2.0.0-alpha.3",
|
||||||
"@freesewing/i18n": "2.0.0-alpha.3",
|
"@freesewing/i18n": "^2.0.0-alpha.3",
|
||||||
"@freesewing/mui-theme": "2.0.0-alpha.3",
|
"@freesewing/mui-theme": "^2.0.0-alpha.3",
|
||||||
"@freesewing/patterns": "2.0.0-alpha.3",
|
"@freesewing/patterns": "^2.0.0-alpha.3",
|
||||||
"@freesewing/plugin-bust": "2.0.0-alpha.3",
|
"@freesewing/plugin-bust": "^2.0.0-alpha.3",
|
||||||
"@freesewing/plugin-buttons": "2.0.0-alpha.3",
|
"@freesewing/plugin-buttons": "^2.0.0-alpha.3",
|
||||||
"@freesewing/plugin-debug": "2.0.0-alpha.3",
|
"@freesewing/plugin-debug": "^2.0.0-alpha.3",
|
||||||
"@freesewing/plugin-designer": "2.0.0-alpha.3",
|
"@freesewing/plugin-designer": "^2.0.0-alpha.3",
|
||||||
"@freesewing/plugin-flip": "2.0.0-alpha.3",
|
"@freesewing/plugin-flip": "^2.0.0-alpha.3",
|
||||||
"@freesewing/utils": "2.0.0-alpha.3",
|
"@freesewing/utils": "^2.0.0-alpha.3",
|
||||||
"@svgr/rollup": "^2.4.1",
|
"@svgr/rollup": "^2.4.1",
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.1",
|
||||||
"cross-env": "^5.1.4",
|
"cross-env": "^5.1.4",
|
||||||
|
|
|
@ -1,69 +1,12 @@
|
||||||
/*
|
import freesewing from "@freesewing/core";
|
||||||
* This file was created by create-freesewing-pattern
|
import plugins from "@freesewing/plugins";
|
||||||
* -> 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 config from "../config";
|
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";
|
import draftBox from "./box";
|
||||||
|
|
||||||
/* Create new design*/
|
// Create new design
|
||||||
const {{name}} = new freesewing.Design(config, [
|
const Pattern = new freesewing.Design(config, plugins);
|
||||||
plugins,
|
|
||||||
//buttons
|
|
||||||
]);
|
|
||||||
|
|
||||||
/*
|
// Attach the draft methods to the prototype
|
||||||
* If you want to extend an existing pattern, you should
|
Pattern.prototype.draftBox = draftBox;
|
||||||
* 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);
|
|
||||||
//};
|
|
||||||
|
|
||||||
/*
|
export default Pattern;
|
||||||
* Attach the draft methods of your own parts to the
|
|
||||||
* design prototype as such:
|
|
||||||
*/
|
|
||||||
{{name}}.prototype.draftBox = draftBox;
|
|
||||||
|
|
||||||
// Export your design
|
|
||||||
export default {{name}};
|
|
||||||
|
|
|
@ -38,11 +38,11 @@ export default {
|
||||||
babel({
|
babel({
|
||||||
exclude: "node_modules/**",
|
exclude: "node_modules/**",
|
||||||
plugins: ["@babel/plugin-proposal-object-rest-spread"]
|
plugins: ["@babel/plugin-proposal-object-rest-spread"]
|
||||||
|
}),
|
||||||
|
minify({
|
||||||
|
comments: false,
|
||||||
|
sourceMap: true,
|
||||||
|
banner: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||||
})
|
})
|
||||||
//minify({
|
|
||||||
// comments: false,
|
|
||||||
// sourceMap: true,
|
|
||||||
// banner: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
|
||||||
//})
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,3 +4,10 @@ packageManager: Paket-Manager
|
||||||
patternDescription: Schnittmusterbeschreibung
|
patternDescription: Schnittmusterbeschreibung
|
||||||
patternName: Schnittmustername
|
patternName: Schnittmustername
|
||||||
patternType: Schnittmustertyp
|
patternType: Schnittmustertyp
|
||||||
|
patternCreated: Das Skelett Ihres Schnittmusters wurde um erstellt
|
||||||
|
runTheseCommands: Führen Sie diese beiden Befehle aus, um zu beginnen
|
||||||
|
startRollup: Starten Sie den Rollup-Bündler in einem Terminal im Überwachungsmodus
|
||||||
|
startWebpack: Führen Sie in einem anderen Terminal den Webpack-Dev-Server aus
|
||||||
|
devDocsAvailableAt: Entwicklerdokumentation ist verfügbar unter
|
||||||
|
talkToUs: Für Fragen, Feedback oder Anregungen sprechen Sie mit uns in unserem Chatroom
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,9 @@ githubRepo: GitHub repository
|
||||||
packageManager: Package manager
|
packageManager: Package manager
|
||||||
patternName: Pattern name
|
patternName: Pattern name
|
||||||
patternType: Pattern type
|
patternType: Pattern type
|
||||||
|
patternCreated: Your pattern skeleton has been created at
|
||||||
|
runTheseCommands: To get started, run these two commands
|
||||||
|
startRollup: In one terminal, start the rollup bundler in watch mode
|
||||||
|
startWebpack: And in another terminal, run the webpack dev server
|
||||||
|
devDocsAvailableAt: Developer documentation is available at
|
||||||
|
talkToUs: For questions, feedback or suggestions, come talk to us in our chat room
|
||||||
|
|
|
@ -4,3 +4,9 @@ packageManager: Gerente de empaquetación
|
||||||
patternDescription: Descripción del patrón
|
patternDescription: Descripción del patrón
|
||||||
patternName: Nombre del patrón
|
patternName: Nombre del patrón
|
||||||
patternType: Tipo del patrón
|
patternType: Tipo del patrón
|
||||||
|
patternCreated: El esqueleto de tu patrón ha sido creado en
|
||||||
|
runTheseCommands: Para empezar, ejecute estos dos comandos
|
||||||
|
startRollup: En un terminal, inicie rollup en modo de reloj
|
||||||
|
startWebpack: Y en otro terminal, ejecuta el servidor webpack dev
|
||||||
|
devDocsAvailableAt: La documentación del desarrollador está disponible en
|
||||||
|
talkToUs: Para preguntas, comentarios o sugerencias, venga a hablar con nosotros en nuestra sala de chat
|
||||||
|
|
|
@ -4,3 +4,9 @@ packageManager: Gestionnaire de paquets
|
||||||
patternName: Nom du patron
|
patternName: Nom du patron
|
||||||
patternDescription: Description du patron
|
patternDescription: Description du patron
|
||||||
patternType: Type de patron
|
patternType: Type de patron
|
||||||
|
patternCreated: Le squelette de votre patron a été créé à
|
||||||
|
runTheseCommands: Pour commencer, lancez ces deux commandes
|
||||||
|
startRollup: Dans un terminal, démarrez rollup en mode veille
|
||||||
|
startWebpack: Et dans un autre terminal, exécutez le serveur de développement webpack
|
||||||
|
devDocsAvailableAt: La documentation du développeur est disponible à l'adresse
|
||||||
|
talkToUs: Pour des questions, des commentaires ou des suggestions, venez nous parler dans notre salle de chat
|
||||||
|
|
|
@ -4,3 +4,10 @@ packageManager: Pakket manager
|
||||||
patternName: Patroonnaam
|
patternName: Patroonnaam
|
||||||
patternDescription: Patroon beschrijving
|
patternDescription: Patroon beschrijving
|
||||||
patternType: Patroon type
|
patternType: Patroon type
|
||||||
|
patternCreated: Het skelet van je patroon is aangemaakt in
|
||||||
|
runTheseCommands: Voer deze twee opdrachten uit om aan de slag te gaan
|
||||||
|
startRollup: Start in één terminal rollup in watch-modus
|
||||||
|
startWebpack: En in een andere terminal start je de webpack dev-server
|
||||||
|
devDocsAvailableAt: Documentatie voor ontwikkelaars is beschikbaar op
|
||||||
|
talkToUs: Voor vragen, feedback of suggesties, kan je terecht in onze chatroom
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue