diff --git a/dist/installers/install-vilt-ds-jetstream.js b/dist/installers/install-vilt-ds-jetstream.js index 3ce7ccc9..e08c7a65 100644 --- a/dist/installers/install-vilt-ds-jetstream.js +++ b/dist/installers/install-vilt-ds-jetstream.js @@ -22,11 +22,11 @@ import generateViteTsxDts from '../generators/jetstream/resources/js/generate-vi import generateViteWindowDts from '../generators/jetstream/resources/js/generate-vite-window-d-ts.js'; import generateWebPhp from '../generators/jetstream/routes/generate-web-php.js'; export default function () { - // update the app gitignore file for VILT DS - installFile('/.gitignore', generateGitignore()); // install client side deps and package scripts/mods for VILT DS and VueVentus installJetstreamNpmDeps(); installJetstreamPackageJsonMods(); + // update the app gitignore file for VILT DS + installFile('/.gitignore', generateGitignore()); // install typescript specific app files installFile('/resources/js/Types/app-colors-types.ts', generateAppColorsTypesTs()); installFile('/resources/js/Types/app-jetstream-types.ts', generateAppJetstreamTypesTs()); diff --git a/dist/installers/install-vilt-ds-jetstream.js.map b/dist/installers/install-vilt-ds-jetstream.js.map index eb54eb2c..18564ec8 100644 --- a/dist/installers/install-vilt-ds-jetstream.js.map +++ b/dist/installers/install-vilt-ds-jetstream.js.map @@ -1 +1 @@ -{"version":3,"file":"install-vilt-ds-jetstream.js","sourceRoot":"","sources":["../../src/installers/install-vilt-ds-jetstream.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,OAAO,WAAW,MAAM,4BAA4B,CAAA;AAEpD,OAAO,yBAAyB,MAAM,0DAA0D,CAAA;AAChG,OAAO,sBAAsB,MAAM,0CAA0C,CAAA;AAE7E,OAAO,uBAAuB,MAAM,0DAA0D,CAAA;AAC9F,OAAO,+BAA+B,MAAM,mEAAmE,CAAA;AAE/G,OAAO,mBAAmB,MAAM,mEAAmE,CAAA;AACnG,OAAO,wBAAwB,MAAM,4EAA4E,CAAA;AACjH,OAAO,2BAA2B,MAAM,+EAA+E,CAAA;AACvH,OAAO,aAAa,MAAM,yDAAyD,CAAA;AACnF,OAAO,kBAAkB,MAAM,qEAAq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ACtD,WAAW,CAAE,iBAAiB,EAAE,oBAAoB,EAAE,CAAE,CAAA;IAExD,mCAAmC;IACnC,WAAW,CAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAE,CAAA;IAEhE,uDAAuD;IACvD,WAAW,CAAE,+BAA+B,EAAE,IAAI,CAAC,SAAS,CAAC,yBAAyB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAE,CAAA;IAClG,WAAW,CAAE,iCAAiC,EAAE,sBAAsB,EAAE,CAAE,CAAA;IAC1E,WAAW,CAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAE,CAAA;IAEjE,8BAA8B;IAC9B,WAAW,CAAE,gCAAgC,EAAE,mBAAmB,EAAE,CAAE,CAAA;IAEtE,uCAAuC;IACvC,WAAW,CAAE,uBAAuB,EAAE,oBAAoB,EAAE,CAAE,CAAA;IAC9D,WAAW,CAAE,iBAAiB,EAAE,cAAc,EAAE,CAAE,CAAA;IAElD,mDAAmD;IACnD,WAAW,CAAE,0BAA0B,EAAE,IAAI,CAAC,SAAS,CAAC,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAE,CAAA;AAE9F,CAAC"} \ No newline at end of file +{"version":3,"file":"install-vilt-ds-jetstream.js","sourceRoot":"","sources":["../../src/installers/install-vilt-ds-jetstream.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,OAAO,WAAW,MAAM,4BAA4B,CAAA;AAEpD,OAAO,yBAAyB,MAAM,0DAA0D,CAAA;AAChG,OAAO,sBAAsB,MAAM,0CAA0C,CAAA;AAE7E,OAAO,uBAAuB,MAAM,0DAA0D,CAAA;AAC9F,OAAO,+BAA+B,MAAM,mEAAmE,CAAA;AAE/G,OAAO,mBAAmB,MAAM,mEAAmE,CAAA;AACnG,OAAO,wBAAwB,MAAM,4EAA4E,CAAA;AACjH,OAAO,2BAA2B,MAAM,+EAA+E,CAAA;AACvH,OAAO,aAAa,MAAM,yDAAyD,CAAA;AACnF,OAAO,kBAAkB,MAAM,qE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A;IACtD,WAAW,CAAE,iBAAiB,EAAE,oBAAoB,EAAE,CAAE,CAAA;IAExD,mCAAmC;IACnC,WAAW,CAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAE,CAAA;IAEhE,uDAAuD;IACvD,WAAW,CAAE,+BAA+B,EAAE,IAAI,CAAC,SAAS,CAAC,yBAAyB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAE,CAAA;IAClG,WAAW,CAAE,iCAAiC,EAAE,sBAAsB,EAAE,CAAE,CAAA;IAC1E,WAAW,CAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAE,CAAA;IAEjE,8BAA8B;IAC9B,WAAW,CAAE,gCAAgC,EAAE,mBAAmB,EAAE,CAAE,CAAA;IAEtE,uCAAuC;IACvC,WAAW,CAAE,uBAAuB,EAAE,oBAAoB,EAAE,CAAE,CAAA;IAC9D,WAAW,CAAE,iBAAiB,EAAE,cAAc,EAAE,CAAE,CAAA;IAElD,mDAAmD;IACnD,WAAW,CAAE,0BAA0B,EAAE,IAAI,CAAC,SAAS,CAAC,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAE,CAAA;AAE9F,CAAC"} \ No newline at end of file diff --git a/dist/scrapers/scrape-config-jetstream-php.js b/dist/scrapers/scrape-config-jetstream-php.js index 297b8213..849ecb95 100644 --- a/dist/scrapers/scrape-config-jetstream-php.js +++ b/dist/scrapers/scrape-config-jetstream-php.js @@ -3,9 +3,9 @@ import fs from 'fs-extra'; import cwd from '../helpers/cwd.js'; import projectFileDoesExist from '../helpers/project-file-does-exist.js'; export default function () { - const path = cwd + '/config/jetstream.php'; + const path = '/config/jetstream.php'; if (projectFileDoesExist(path)) { - var scraped = fs.readFileSync(path, 'utf8'); + var scraped = fs.readFileSync(cwd + path, 'utf8'); let modifiedData = String(scraped).replace('// Features::termsAndPrivacyPolicy()', 'Features::termsAndPrivacyPolicy()').replace('// Features::api()', 'Features::api()'); return modifiedData; } diff --git a/dist/scrapers/scrape-config-jetstream-php.js.map b/dist/scrapers/scrape-config-jetstream-php.js.map index 769947c0..8b924737 100644 --- a/dist/scrapers/scrape-config-jetstream-php.js.map +++ b/dist/scrapers/scrape-config-jetstream-php.js.map @@ -1 +1 @@ -{"version":3,"file":"scrape-config-jetstream-php.js","sourceRoot":"","sources":["../../src/scrapers/scrape-config-jetstream-php.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,GAAG,MAAM,mBAAmB,CAAA;AACnC,OAAO,oBAAoB,MAAM,uCAAuC,CAAA;AAExE,MAAM,CAAC,OAAO;IAEV,MAAM,IAAI,GAAG,GAAG,GAAG,uBAAuB,CAAA;IAE1C,IAAK,oBAAoB,CAAC,IAAI,CAAC,EAAG;QAE9B,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAC,MAAM,CAAC,CAAA;QAE1C,IAAI,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CACtC,sCAAsC,EACtC,mCAAmC,CACtC,CAAC,OAAO,CACL,oBAAoB,EACpB,iBAAiB,CACpB,CAAA;QAED,OAAO,YAAY,CAAA;KAEtB;SAAM;QAEH,OAAO,IAAI,CAAA;KAEd;AAEL,CAAC"} \ No newline at end of file +{"version":3,"file":"scrape-config-jetstream-php.js","sourceRoot":"","sources":["../../src/scrapers/scrape-config-jetstream-php.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,GAAG,MAAM,mBAAmB,CAAA;AACnC,OAAO,oBAAoB,MAAM,uCAAuC,CAAA;AAExE,MAAM,CAAC,OAAO;IAEV,MAAM,IAAI,GAAG,uBAAuB,CAAA;IAEpC,IAAK,oBAAoB,CAAC,IAAI,CAAC,EAAG;QAE9B,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,GAAG,IAAI,EAAE,MAAM,CAAC,CAAA;QAEjD,IAAI,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CACtC,sCAAsC,EACtC,mCAAmC,CACtC,CAAC,OAAO,CACL,oBAAoB,EACpB,iBAAiB,CACpB,CAAA;QAED,OAAO,YAAY,CAAA;KAEtB;SAAM;QAEH,OAAO,IAAI,CAAA;KAEd;AAEL,CAAC"} \ No newline at end of file diff --git a/dist/scrapers/scrape-gitignore.js b/dist/scrapers/scrape-gitignore.js index 0476479e..70b0b415 100644 --- a/dist/scrapers/scrape-gitignore.js +++ b/dist/scrapers/scrape-gitignore.js @@ -3,9 +3,9 @@ import fs from 'fs-extra'; import cwd from '../helpers/cwd.js'; import projectFileDoesExist from '../helpers/project-file-does-exist.js'; export default function () { - const path = cwd + '/.gitignore'; + const path = '/.gitignore'; if (projectFileDoesExist(path)) { - var scraped = fs.readFileSync(path, 'utf8'); + var scraped = fs.readFileSync(cwd + path, 'utf8'); return scraped; } else { diff --git a/dist/scrapers/scrape-gitignore.js.map b/dist/scrapers/scrape-gitignore.js.map index c4918d61..6d4890f2 100644 --- a/dist/scrapers/scrape-gitignore.js.map +++ b/dist/scrapers/scrape-gitignore.js.map @@ -1 +1 @@ -{"version":3,"file":"scrape-gitignore.js","sourceRoot":"","sources":["../../src/scrapers/scrape-gitignore.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,GAAG,MAAM,mBAAmB,CAAA;AACnC,OAAO,oBAAoB,MAAM,uCAAuC,CAAA;AAExE,MAAM,CAAC,OAAO;IAEV,MAAM,IAAI,GAAG,GAAG,GAAG,aAAa,CAAA;IAEhC,IAAK,oBAAoB,CAAC,IAAI,CAAC,EAAG;QAE9B,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAC,MAAM,CAAC,CAAA;QAE1C,OAAO,OAAO,CAAA;KAEjB;SAAM;QAEH,OAAO,IAAI,CAAA;KAEd;AAEL,CAAC"} \ No newline at end of file +{"version":3,"file":"scrape-gitignore.js","sourceRoot":"","sources":["../../src/scrapers/scrape-gitignore.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,GAAG,MAAM,mBAAmB,CAAA;AACnC,OAAO,oBAAoB,MAAM,uCAAuC,CAAA;AAExE,MAAM,CAAC,OAAO;IAEV,MAAM,IAAI,GAAG,aAAa,CAAA;IAE1B,IAAK,oBAAoB,CAAC,IAAI,CAAC,EAAG;QAE9B,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,GAAG,IAAI,EAAE,MAAM,CAAC,CAAA;QAEjD,OAAO,OAAO,CAAA;KAEjB;SAAM;QAEH,OAAO,IAAI,CAAA;KAEd;AAEL,CAAC"} \ No newline at end of file diff --git a/dist/scrapers/scrape-routes-web-php.js b/dist/scrapers/scrape-routes-web-php.js index da015848..36d1e0d4 100644 --- a/dist/scrapers/scrape-routes-web-php.js +++ b/dist/scrapers/scrape-routes-web-php.js @@ -3,9 +3,9 @@ import fs from 'fs-extra'; import cwd from '../helpers/cwd.js'; import projectFileDoesExist from '../helpers/project-file-does-exist.js'; export default function () { - const path = cwd + '/routes/web.php'; + const path = '/routes/web.php'; if (projectFileDoesExist(path)) { - var scraped = fs.readFileSync(path, 'utf8'); + var scraped = fs.readFileSync(cwd + path, 'utf8'); return scraped; } else { diff --git a/dist/scrapers/scrape-routes-web-php.js.map b/dist/scrapers/scrape-routes-web-php.js.map index f9b2c363..fbe225be 100644 --- a/dist/scrapers/scrape-routes-web-php.js.map +++ b/dist/scrapers/scrape-routes-web-php.js.map @@ -1 +1 @@ -{"version":3,"file":"scrape-routes-web-php.js","sourceRoot":"","sources":["../../src/scrapers/scrape-routes-web-php.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAE1C,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,GAAG,MAAM,mBAAmB,CAAA;AACnC,OAAO,oBAAoB,MAAM,uCAAuC,CAAA;AAExE,MAAM,CAAC,OAAO;IAEV,MAAM,IAAI,GAAG,GAAG,GAAG,iBAAiB,CAAA;IAEpC,IAAK,oBAAoB,CAAC,IAAI,CAAC,EAAG;QAE9B,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAC,MAAM,CAAC,CAAA;QAE1C,OAAO,OAAO,CAAA;KAEjB;SAAM;QAEH,OAAO,IAAI,CAAA;KAEd;AAEL,CAAC"} \ No newline at end of file +{"version":3,"file":"scrape-routes-web-php.js","sourceRoot":"","sources":["../../src/scrapers/scrape-routes-web-php.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAE1C,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,GAAG,MAAM,mBAAmB,CAAA;AACnC,OAAO,oBAAoB,MAAM,uCAAuC,CAAA;AAExE,MAAM,CAAC,OAAO;IAEV,MAAM,IAAI,GAAG,iBAAiB,CAAA;IAE9B,IAAK,oBAAoB,CAAC,IAAI,CAAC,EAAG;QAE9B,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,GAAG,IAAI,EAAE,MAAM,CAAC,CAAA;QAEjD,OAAO,OAAO,CAAA;KAEjB;SAAM;QAEH,OAAO,IAAI,CAAA;KAEd;AAEL,CAAC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 77549994..5721e8d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@obewds/vilt-ds", - "version": "0.3.1", + "version": "0.3.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@obewds/vilt-ds", - "version": "0.3.1", + "version": "0.3.2", "license": "MIT", "dependencies": { "fs-extra": "^11.1.1", diff --git a/package.json b/package.json index eb3cc9d3..573f6f82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@obewds/vilt-ds", - "version": "0.3.1", + "version": "0.3.2", "description": "The official repository for the VILT Design System for the Vue.js, Inertia.js, Laravel, and Tailwind CSS web app stack that is turbocharged with Typescript and VueVentus.", "license": "MIT", "author": "Matt McT", diff --git a/src/installers/install-vilt-ds-jetstream.ts b/src/installers/install-vilt-ds-jetstream.ts index af12dee0..45d360fe 100644 --- a/src/installers/install-vilt-ds-jetstream.ts +++ b/src/installers/install-vilt-ds-jetstream.ts @@ -29,13 +29,13 @@ import generateWebPhp from '../generators/jetstream/routes/generate-web-php.js' export default function (): void { - // update the app gitignore file for VILT DS - installFile( '/.gitignore', generateGitignore() ) - // install client side deps and package scripts/mods for VILT DS and VueVentus installJetstreamNpmDeps() installJetstreamPackageJsonMods() + // update the app gitignore file for VILT DS + installFile( '/.gitignore', generateGitignore() ) + // install typescript specific app files installFile( '/resources/js/Types/app-colors-types.ts', generateAppColorsTypesTs() ) installFile( '/resources/js/Types/app-jetstream-types.ts', generateAppJetstreamTypesTs() ) diff --git a/src/scrapers/scrape-config-jetstream-php.ts b/src/scrapers/scrape-config-jetstream-php.ts index 418c4428..f2b647e8 100644 --- a/src/scrapers/scrape-config-jetstream-php.ts +++ b/src/scrapers/scrape-config-jetstream-php.ts @@ -6,11 +6,11 @@ import projectFileDoesExist from '../helpers/project-file-does-exist.js' export default function (): string|null { - const path = cwd + '/config/jetstream.php' + const path = '/config/jetstream.php' if ( projectFileDoesExist(path) ) { - var scraped = fs.readFileSync(path,'utf8') + var scraped = fs.readFileSync(cwd + path, 'utf8') let modifiedData = String(scraped).replace( '// Features::termsAndPrivacyPolicy()', diff --git a/src/scrapers/scrape-gitignore.ts b/src/scrapers/scrape-gitignore.ts index 9012fb16..0c77f5ff 100644 --- a/src/scrapers/scrape-gitignore.ts +++ b/src/scrapers/scrape-gitignore.ts @@ -6,11 +6,11 @@ import projectFileDoesExist from '../helpers/project-file-does-exist.js' export default function (): string|null { - const path = cwd + '/.gitignore' + const path = '/.gitignore' if ( projectFileDoesExist(path) ) { - var scraped = fs.readFileSync(path,'utf8') + var scraped = fs.readFileSync(cwd + path, 'utf8') return scraped diff --git a/src/scrapers/scrape-routes-web-php.ts b/src/scrapers/scrape-routes-web-php.ts index b4460d75..a6974071 100644 --- a/src/scrapers/scrape-routes-web-php.ts +++ b/src/scrapers/scrape-routes-web-php.ts @@ -6,11 +6,11 @@ import projectFileDoesExist from '../helpers/project-file-does-exist.js' export default function (): string|null { - const path = cwd + '/routes/web.php' + const path = '/routes/web.php' if ( projectFileDoesExist(path) ) { - var scraped = fs.readFileSync(path,'utf8') + var scraped = fs.readFileSync(cwd + path, 'utf8') return scraped diff --git a/tests/scrapers/scrape-gitignore.test.ts b/tests/scrapers/scrape-gitignore.test.ts index 5006796e..ea923853 100644 --- a/tests/scrapers/scrape-gitignore.test.ts +++ b/tests/scrapers/scrape-gitignore.test.ts @@ -15,7 +15,8 @@ describe('./src/scrapers/scrape-gitignore module', () => { test('module returns null when a .gitignore file does not exist', () => { - expect(scrapeGitignore()).toBe(null) + // this will be true by default for this repo's ./.gitignore file! + expect(typeof scrapeGitignore() === 'string').toBe(true) })