Skip to content

Commit

Permalink
fix: npm run add script
Browse files Browse the repository at this point in the history
  • Loading branch information
richard1015 committed Jul 27, 2021
1 parent 5198009 commit 1d00b2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jd/createComponentMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function init() {
}
function createIndexJs() {
const nameLc = newCpt.name.toLowerCase();
const destPath = path.join('src/packages/__VUE' + nameLc);
const destPath = path.join('src/packages/__VUE/' + nameLc);
if (!fs.existsSync(destPath)) {
fs.mkdirSync(destPath);
}
Expand Down Expand Up @@ -158,7 +158,7 @@ function createVue() {
return new Promise((resolve, reject) => {
const nameLc = newCpt.name.toLowerCase();
let content = demoModel(nameLc).vue;
const dirPath = path.join(__dirname, `../src/packages/${nameLc}/`);
const dirPath = path.join(__dirname, `../src/packages/__VUE/${nameLc}/`);
const filePath = path.join(dirPath, `index.vue`);
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(filePath);
Expand All @@ -174,7 +174,7 @@ function createDemo() {
return new Promise((resolve, reject) => {
const nameLc = newCpt.name.toLowerCase();
let content = demoModel(nameLc).demo;
const dirPath = path.join(__dirname, '../src/packages/' + nameLc);
const dirPath = path.join(__dirname, '../src/packages/__VUE/' + nameLc);
const filePath = path.join(dirPath, `demo.vue`);
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(filePath);
Expand Down Expand Up @@ -207,7 +207,7 @@ function createScss() {
return new Promise((resolve, reject) => {
const nameLc = newCpt.name.toLowerCase();
let content = `.nut-${nameLc} {}`;
const dirPath = path.join(__dirname, '../src/packages/' + nameLc);
const dirPath = path.join(__dirname, '../src/packages/__VUE/' + nameLc);
const filePath = path.join(dirPath, `index.scss`);
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(filePath);
Expand All @@ -222,7 +222,7 @@ function createDoc() {
return new Promise((resolve, reject) => {
const nameLc = newCpt.name.toLowerCase();
let content = demoModel(nameLc).doc;
const dirPath = path.join(__dirname, '../src/packages/' + nameLc);
const dirPath = path.join(__dirname, '../src/packages/__VUE/' + nameLc);
const filePath = path.join(dirPath, `doc.md`);
if (!fs.existsSync(dirPath)) {
fs.mkdirSync(filePath);
Expand Down

0 comments on commit 1d00b2b

Please sign in to comment.