File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -42,15 +42,15 @@ if(!componentName.startsWith("Article")) {
4242// Create files...
4343const jsxContent = makeArticleComponent ( componentName , slug )
4444fileUtils . createFile ( articlesDir , jsxPath , jsxContent )
45- fileUtils . createFile ( articlesDir , scssPath , `@import "/src /styles/extend.scss";` )
45+ fileUtils . createFile ( articlesDir , scssPath , `@import ".. /styles/extend.scss";` )
4646logger . log ( logger . LogTypes . SUCCESS , `Successfully created article: ${ componentName } ` )
4747
4848// Inject into SectionBody.jsx
4949const sectionBodyPath = path . resolve ( "src/components/sections/SectionBody.jsx" )
5050let sectionBodyContent = fs . readFileSync ( sectionBodyPath , "utf8" )
5151
5252// 1. Add import
53- const importStatement = `import ${ componentName } from "/src /components/articles/${ componentName } .jsx"`
53+ const importStatement = `import ${ componentName } from ".. /components/articles/${ componentName } .jsx"`
5454if ( ! sectionBodyContent . includes ( importStatement ) ) {
5555 const importRegex = / i m p o r t A r t i c l e N o t F o u n d f r o m .+ ?\n /
5656 sectionBodyContent = sectionBodyContent . replace ( importRegex , match => `${ match } ${ importStatement } \n` )
You can’t perform that action at this time.
0 commit comments