From 1132790fd85bcba3d98392433a8464c84cd3507b Mon Sep 17 00:00:00 2001 From: Roman Axelrod Date: Mon, 17 Oct 2022 14:50:48 +0300 Subject: [PATCH] Rename them package --- build.js | 2 +- create-block.js | 2 +- generators/block/index-old.js | 133 ---------------------------------- package-lock.json | 4 +- package.json | 2 +- server.js | 2 +- 6 files changed, 6 insertions(+), 139 deletions(-) delete mode 100644 generators/block/index-old.js diff --git a/build.js b/build.js index fa218ee..1d65912 100755 --- a/build.js +++ b/build.js @@ -7,7 +7,7 @@ import yeoman from 'yeoman-environment'; import {buildHubspot} from "./platforms/hubspot/hubspot-adapter.js"; const isDev = process.env.NODE_ENV === 'development' || (config.has('isDev') && config.get('isDev')); // Check README file in case you get "missing files" error. -const modulePath = isDev ? '' : 'node_modules/create-block-dev-tool/'; +const modulePath = isDev ? '' : 'node_modules/block-dev-tool/'; const blockName = config.has('blockName') ? config.get('blockName') : 'development'; diff --git a/create-block.js b/create-block.js index 39070ba..5ae5ed8 100755 --- a/create-block.js +++ b/create-block.js @@ -11,7 +11,7 @@ import {fileURLToPath} from 'url'; import memFs from 'mem-fs'; import editor from 'mem-fs-editor'; -export const defaultGitRepo = 'git+https://git.devdevdev.life/axe-web-public/create-block.git#master'; +export const defaultGitRepo = 'git+https://git.devdevdev.life/axe-web-public/block-dev-tool.git#master'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/generators/block/index-old.js b/generators/block/index-old.js deleted file mode 100644 index 2ff418e..0000000 --- a/generators/block/index-old.js +++ /dev/null @@ -1,133 +0,0 @@ -console.log('Not in use.'); - -// import path from 'path'; -// import Generator from "yeoman-generator"; -// import mkdirp from "mkdirp"; -// import {fileURLToPath} from 'url'; -// import {capitalize} from "../../helpers.js"; -// import {createTechnicalFiles, defaultGitRepo} from "../../create-block.js"; -// -// const __filename = fileURLToPath(import.meta.url); -// const __dirname = path.dirname(__filename); -// -// const baseDir = path.join(__dirname, '../../'); -// -// export default class extends Generator { -// async prompting() { -// this.data = await this.prompt([ -// { -// type: "input", -// name: "name", -// message: "Block Name", -// validate: (str) => { -// const matches = str.match(/\d+/g); -// -// if (matches != null) { -// return false; -// } -// -// return !!str; -// } -// }, -// { -// type: "input", -// name: "group", -// message: "Company/Organization Name", -// validate: (str) => { -// const matches = str.match(/\d+/g); -// -// if (matches != null) { -// return false; -// } -// -// return !!str; -// } -// }, -// { -// type: "list", -// name: "baseView", -// message: "View Template", -// default: 'container', -// choices: ['container', 'alignfull'], -// }, -// { -// type: "number", -// name: "remToPx", -// message: "Provide declaration of 1rem:", -// default: 16 -// }, -// { -// type: 'input', -// name: 'devToolSource', -// message: 'DevTool Version/Source (master)', -// default: defaultGitRepo -// } -// ]); -// } -// -// writing() { -// const title = capitalize(this.data.name); -// const group = capitalize(this.data.group); -// const data = Object.assign(this.data, { -// title, -// version: '1.0.0', -// blockFilename: title.toLowerCase().replace(/ /ig, '-'), -// blockGroupName: group.toLowerCase().replace(/ /ig, '-'), -// blockClassName: title.toLowerCase().replace(/ /ig, '_'), -// }); -// -// const pathDist = path.join(baseDir, 'blocks', data.blockFilename); -// -// this.fs.copyTpl( -// this.templatePath('config/default.cjs'), -// this.destinationPath(path.join(pathDist, 'config', 'default.cjs')), -// data -// ); -// -// -// // SRC Template files -// this.fs.copyTpl( -// this.templatePath('src/template.template.hbs'), -// this.destinationPath(path.join(pathDist, 'src', data.blockFilename + '.template.hbs')), -// data -// ); -// -// this.fs.copyTpl( -// this.templatePath('src/styles/template.scss'), -// this.destinationPath(path.join(pathDist, 'src', 'styles', data.blockFilename + '.scss')), -// data -// ); -// -// this.fs.copyTpl( -// this.templatePath('src/scripts/template.js'), -// this.destinationPath(path.join(pathDist, 'src', 'scripts', data.blockFilename + '.js')), -// data -// ); -// -// this.fs.copyTpl( -// this.templatePath('src/images/demo.jpeg'), -// this.destinationPath(path.join(pathDist, 'src', 'images', 'demo.jpeg')), -// data -// ); -// -// // Design Directory -// mkdirp.sync(path.join(pathDist, 'design')); -// -// // Data Files -// this.fs.copyTpl( -// this.templatePath('data/default.json'), -// this.destinationPath(path.join(pathDist, 'data', 'default.json')), -// data -// ); -// -// this.fs.copyTpl( -// this.templatePath('data/advanced.json'), -// this.destinationPath(path.join(pathDist, 'data', 'advanced.json')), -// data -// ); -// -// // Technical Project files. -// createTechnicalFiles(data, baseDir, `blocks/${data.name}`).then(); -// } -// } -// diff --git a/package-lock.json b/package-lock.json index 01a2fb5..f5373a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@axe-web/create-block", + "name": "@axe-web/block-dev-tool", "version": "1.0.15", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "@axe-web/create-block", + "name": "@axe-web/block-dev-tool", "version": "1.0.15", "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index ae1e94f..be779c1 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@axe-web/create-block", + "name": "@axe-web/block-dev-tool", "version": "1.0.16", "author": { "name": "AXE-WEB", diff --git a/server.js b/server.js index 1e3742a..65d1593 100755 --- a/server.js +++ b/server.js @@ -26,7 +26,7 @@ import archiver from 'archiver'; const isDev = process.env.NODE_ENV === 'development' || (config.has('isDev') && config.get('isDev')); // Check README file in case you get "missing files" error. const blocksRegistry = isDev ? 'http://localhost:3020' : 'https://axe-web-blocks-registry.captain.devdevdev.life'; -const modulePath = isDev ? '' : 'node_modules/create-block-dev-tool/'; +const modulePath = isDev ? '' : 'node_modules/block-dev-tool/'; const projectDir = modulePath; const sass = gulpSass(dartSass);