parent
f5b6361416
commit
cb10e490f8
4 changed files with 7 additions and 7 deletions
|
@ -5,6 +5,7 @@ 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 strings = require('@freesewing/i18n').strings
|
||||||
|
const freesewing_version = require('@freesewing/pattern-info').versions.brian
|
||||||
|
|
||||||
const getDefaultLibraryParams = require('./get-default-library-params')
|
const getDefaultLibraryParams = require('./get-default-library-params')
|
||||||
const createLibrary = require('./create-library')
|
const createLibrary = require('./create-library')
|
||||||
|
@ -12,8 +13,8 @@ const promptLibraryParams = require('./prompt-library-params')
|
||||||
|
|
||||||
module.exports = async () => {
|
module.exports = async () => {
|
||||||
// Check node version
|
// Check node version
|
||||||
const version = process.version.slice(1).split('.')[0]
|
const node_version = process.version.slice(1).split('.')[0]
|
||||||
if (parseInt(version) < 10 && process.argv.indexOf('--skip-version-check') === -1)
|
if (parseInt(node_version) < 10 && process.argv.indexOf('--skip-version-check') === -1)
|
||||||
throw `
|
throw `
|
||||||
⚠️ FreeSewing requires Node v10 or newer.
|
⚠️ FreeSewing requires Node v10 or newer.
|
||||||
|
|
||||||
|
@ -29,7 +30,7 @@ module.exports = async () => {
|
||||||
|
|
||||||
program
|
program
|
||||||
.name('create-freesewing-pattern')
|
.name('create-freesewing-pattern')
|
||||||
.version(version)
|
.version(node_version)
|
||||||
.usage('[options] [package-name]')
|
.usage('[options] [package-name]')
|
||||||
.option('-d, --desc <string>', 'package description')
|
.option('-d, --desc <string>', 'package description')
|
||||||
.option('-a, --author <string>', "author's github handle", defaults.author)
|
.option('-a, --author <string>', "author's github handle", defaults.author)
|
||||||
|
@ -58,7 +59,7 @@ module.exports = async () => {
|
||||||
templatePath: program.templatePath,
|
templatePath: program.templatePath,
|
||||||
skipPrompts: program.skipPrompts,
|
skipPrompts: program.skipPrompts,
|
||||||
git: program.git,
|
git: program.git,
|
||||||
version
|
freesewing_version,
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.keys(opts).forEach((key) => {
|
Object.keys(opts).forEach((key) => {
|
||||||
|
|
|
@ -141,7 +141,7 @@ module.exports = async opts => {
|
||||||
return {
|
return {
|
||||||
...info,
|
...info,
|
||||||
git: opts.git,
|
git: opts.git,
|
||||||
version: opts.version
|
freesewing_version: opts.freesewing_version
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "{{name}}",
|
"name": "{{name}}",
|
||||||
"homepage": "https://{{name}}.freesewing.dev/",
|
"homepage": "https://{{name}}.freesewing.dev/",
|
||||||
"version": "{{version}}",
|
"version": "{{freesewing_version}}",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/permanent-marker": "^4.1.0",
|
"@fontsource/permanent-marker": "^4.1.0",
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React from 'react'
|
||||||
import freesewing from '@freesewing/core'
|
import freesewing from '@freesewing/core'
|
||||||
import Workbench from '@freesewing/components/Workbench'
|
import Workbench from '@freesewing/components/Workbench'
|
||||||
import '@freesewing/css-theme'
|
import '@freesewing/css-theme'
|
||||||
import './layout.scss'
|
|
||||||
|
|
||||||
import Pattern from 'pattern'
|
import Pattern from 'pattern'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue