Skip to content

Commit

Permalink
Merge pull request #22 from obewds/dev
Browse files Browse the repository at this point in the history
0.3.2 - patching file scrapers bug from double cwd calls
  • Loading branch information
oberocks authored Aug 4, 2023
2 parents 03596e1 + fa2c0f3 commit 06f4214
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 25 deletions.
4 changes: 2 additions & 2 deletions dist/installers/install-vilt-ds-jetstream.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/installers/install-vilt-ds-jetstream.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/scrapers/scrape-config-jetstream-php.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/scrapers/scrape-config-jetstream-php.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/scrapers/scrape-gitignore.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/scrapers/scrape-gitignore.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/scrapers/scrape-routes-web-php.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/scrapers/scrape-routes-web-php.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 3 additions & 3 deletions src/installers/install-vilt-ds-jetstream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down
4 changes: 2 additions & 2 deletions src/scrapers/scrape-config-jetstream-php.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()',
Expand Down
4 changes: 2 additions & 2 deletions src/scrapers/scrape-gitignore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/scrapers/scrape-routes-web-php.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion tests/scrapers/scrape-gitignore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

})

Expand Down

0 comments on commit 06f4214

Please sign in to comment.