-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from doox911-opensource/dev
feat: ✨ Move store-flag.d.ts to shared
- Loading branch information
Showing
10 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const { moveStoreFlagsToShared } = require('./move-store-flags-to-shared') | ||
|
||
function fsdFix() { | ||
/** | ||
* This is necessary because Quasar does not provide | ||
* the ability to specify the location of the - store-flag.d.ts | ||
* file generation in the project | ||
*/ | ||
moveStoreFlagsToShared() | ||
} | ||
|
||
module.exports = fsdFix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
const fs = require('fs') | ||
|
||
const path = require('path') | ||
|
||
const { black, red, green, bgRed, bgGreen, lightCyan } = require('kolorist') | ||
|
||
const ROOT = path.resolve(__dirname, '../../') | ||
|
||
function moveStoreFlagsToShared() { | ||
const name = 'store-flag.d.ts' | ||
|
||
const currentDir = '/src/app' | ||
|
||
const newDir = '/src/shared/types' | ||
|
||
const dts = path.join(ROOT, `${currentDir}/${name}`) | ||
|
||
fs.stat(dts, e => { | ||
if (e) return | ||
fs.copyFile(dts, path.join(ROOT, `${newDir}/${name}`), (e) => { | ||
if (e) { | ||
console.log( | ||
`${red(' App •')} ${bgRed(black(' FSD FIX '))} ${red('•')} File ${ | ||
lightCyan(`.${currentDir}/${name}`) | ||
} was not copied (see: quasar.config.js)`, | ||
) | ||
} else { | ||
console.log( | ||
`${green(' App •')} ${bgGreen(black(' FSD FIX '))} ${green('•')} File ${ | ||
lightCyan(`.${currentDir}/${name}`) | ||
} was copied to ${lightCyan(`.${newDir}/${name}`)})} (see: quasar.config.js)`, | ||
) | ||
|
||
fs.unlink(dts, (e) => { | ||
if (e) { | ||
console.log( | ||
`${red(' App •')} ${bgRed(black(' FSD FIX '))} ${red('•')} File ${ | ||
lightCyan(`.${currentDir}/${name}`) | ||
} was deleted (see: quasar.config.js)`, | ||
) | ||
} | ||
|
||
console.log( | ||
`${green(' App •')} ${bgGreen(black(' FSD FIX '))} ${green('•')} File ${ | ||
lightCyan(`.${currentDir}/${name}`) | ||
} was deleted (see: quasar.config.js)`, | ||
) | ||
}) | ||
} | ||
}) | ||
}) | ||
} | ||
|
||
module.exports = { moveStoreFlagsToShared } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { fsdFix: require('./fsd/fsdFix') } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/* eslint-disable */ | ||
// THIS FEATURE-FLAG FILE IS AUTOGENERATED, | ||
// REMOVAL OR CHANGES WILL CAUSE RELATED TYPES TO STOP WORKING | ||
import 'quasar/dist/types/feature-flag' | ||
import "quasar/dist/types/feature-flag"; | ||
|
||
declare module 'quasar/dist/types/feature-flag' { | ||
declare module "quasar/dist/types/feature-flag" { | ||
interface QuasarFeatureFlags { | ||
store: true | ||
store: true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters