Skip to content

Commit

Permalink
Merge pull request #400 from Vagr9K/theme-building
Browse files Browse the repository at this point in the history
Add scripts to prebuild gatsby-theme-advanced.
  • Loading branch information
Vagr9K committed Jul 4, 2022
2 parents a7ea9d7 + fc0c494 commit c10b17f
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ bundle-stats.json

# TypeScript output
lib/
dist/

# Prebuilt packages
pkgroot/

# TypeScript coverage
coverage-ts/
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "gatsby-theme-advanced-demo",
"description": "GatsbyJS theme demo built on top of gatsby-theme-advanced.",
"version": "4.17.0",
"version": "4.17.1",
"author": "Ruben Harutyunyan <vagr9k@gmail.com>",
"keywords": [
"gatsby",
Expand Down
2 changes: 1 addition & 1 deletion examples/amaranth-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "gatsby-theme-amaranth-demo",
"description": "GatsbyJS theme demo built on top of gatsby-theme-amaranth.",
"version": "4.17.0",
"version": "4.17.1",
"author": "Ruben Harutyunyan <vagr9k@gmail.com>",
"keywords": [
"gatsby",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"name": "gatsby-starter-advanced",
"description": "GatsbyJS starter that includes examples for advanced use cases.",
"version": "4.17.0",
"version": "4.17.1",
"author": "Ruben Harutyunyan <vagr9k@gmail.com>",
"keywords": [
"gatsby",
Expand Down
13 changes: 11 additions & 2 deletions themes/advanced/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-theme-advanced",
"description": "GatsbyJS theme equipped with advanced features.",
"version": "4.17.0",
"version": "4.17.1",
"author": "Ruben Harutyunyan <vagr9k@gmail.com> (https://harutyunyan.dev/)",
"homepage": "https://github.com/Vagr9K/gatsby-advanced-starter/tree/master/themes/advanced",
"bugs": "https://github.com/Vagr9K/gatsby-advanced-starter/issues",
Expand Down Expand Up @@ -154,6 +154,15 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch",
"write-good": "write-good $(glob 'content/**/*.md')"
"write-good": "write-good $(glob 'content/**/*.md')",
"publish-prebuilt": "npm run prebuild && npm run prebuild:publish",
"pack-prebuilt": "npm run prebuild && npm run prebuild:pack",
"clean-prebuilt": "rm -rf pkgroot lib",
"prebuild": "npm run prebuild:build && npm run prebuild:create-root && npm run prebuild:replace-ts-paths",
"prebuild:build": "tsc -p tsconfig.prebuild.json",
"prebuild:create-root": "mkdir -p pkgroot && cp -R package.json README.md docs LICENSE static content lib/advanced/* pkgroot",
"prebuild:replace-ts-paths": "find ./pkgroot/ -type f -exec sed -i 's/\\.ts\"/.js\"/g' {} \\; && find ./pkgroot/ -type f -exec sed -i 's/\\.tsx\"/.jsx\"/g' {} \\;",
"prebuild:publish": "cd pkgroot && npm publish",
"prebuild:pack": "cd pkgroot && npm pack"
}
}
31 changes: 31 additions & 0 deletions themes/advanced/tsconfig.prebuild.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"exclude": ["node_modules", "**/tests", "**/*.spec.*"],
"include": ["./gatsby/**/*", "./src/**/*", "./index.ts", "./gatsby-*.js"],
"compilerOptions": {
"jsx": "preserve",
"lib": ["dom", "es2015", "es2017", "es2019"],
"allowJs": true,
"incremental": true,
"target": "es2015",
"module": "commonjs",
"checkJs": true,
"declaration": true,
"outDir": "lib",
"strict": true,
"noImplicitAny": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true,
"removeComments": false,
"preserveConstEnums": true,
"noEmit": false
}
}
2 changes: 1 addition & 1 deletion themes/amaranth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-theme-amaranth",
"description": "A stylish GatsbyJS theme built on top of gatsby-theme-advanced.",
"version": "4.17.0",
"version": "4.17.1",
"author": "Ruben Harutyunyan <vagr9k@gmail.com> (https://harutyunyan.dev/)",
"homepage": "https://github.com/Vagr9K/gatsby-advanced-starter/tree/master/themes/amaranth",
"bugs": "https://github.com/Vagr9K/gatsby-advanced-starter/issues",
Expand Down

2 comments on commit c10b17f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.