create-application-template 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-application-template",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "provides a configured application template for you to build upon",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -33,6 +33,7 @@
33
33
  "stylelint",
34
34
  "javascript"
35
35
  ],
36
+ "url": "https://www.createapplicationtemplate.com/",
36
37
  "repository": {
37
38
  "type": "git",
38
39
  "url": "https://github.com/daveKontro/create-application-template.git"
@@ -107,12 +108,14 @@
107
108
  "stylelint-config-standard": "36.0.0",
108
109
  "stylelint-no-unsupported-browser-features": "8.0.4",
109
110
  "terser-webpack-plugin": "5.3.12",
111
+ "ts-node": "10.9.2",
110
112
  "typescript": "5.8.2",
111
113
  "webpack": "5.98.0",
112
114
  "webpack-cli": "6.0.1",
113
115
  "webpack-dev-server": "5.2.0",
114
116
  "webpack-manifest-plugin": "5.0.0",
115
117
  "webpack-merge": "6.0.1",
118
+ "webpack-shell-plugin-next": "2.3.2",
116
119
  "whatwg-fetch": "3.6.20"
117
120
  }
118
121
  }
@@ -0,0 +1,25 @@
1
+ const { existsSync, writeFileSync } = require('fs')
2
+ const path = require('path')
3
+ const packageJson = require('../package.json')
4
+
5
+ const now = new Date().toISOString()
6
+ const sitemapPath = path.resolve(__dirname, '../src/public/sitemap.xml')
7
+ const baseUrl = packageJson.url || 'https://www.createapplicationtemplate.com/'
8
+
9
+ if (existsSync(sitemapPath)) {
10
+ console.log('📝 overwriting existing sitemap.xml')
11
+ }
12
+
13
+ const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
14
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
15
+ <url>
16
+ <loc>${baseUrl}</loc>
17
+ <lastmod>${now}</lastmod>
18
+ <changefreq>weekly</changefreq>
19
+ <priority>1.0</priority>
20
+ </url>
21
+ </urlset>`
22
+
23
+ writeFileSync(sitemapPath, sitemap.trim())
24
+
25
+ console.info('✅ sitemap.xml updated with lastmod:', now)
@@ -1,3 +1,6 @@
1
1
  # https://www.robotstxt.org/robotstxt.html
2
2
  User-agent: *
3
- Allow: /
3
+ Disallow:
4
+
5
+ Sitemap: https://www.createapplicationtemplate.com/sitemap.xml
6
+
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
+ <url>
4
+ <loc>https://www.createapplicationtemplate.com/</loc>
5
+ <lastmod>2025-04-08T16:38:42.528Z</lastmod>
6
+ <changefreq>weekly</changefreq>
7
+ <priority>1.0</priority>
8
+ </url>
9
+ </urlset>
@@ -4,6 +4,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin')
4
4
  const Dotenv = require('dotenv-webpack')
5
5
  const { WebpackManifestPlugin } = require('webpack-manifest-plugin')
6
6
  const CopyPlugin = require('copy-webpack-plugin')
7
+ const WebpackShellPluginNext =require('webpack-shell-plugin-next')
7
8
  const env = require('./utilities/env')
8
9
  const getPaths = require('./utilities/getPaths')
9
10
  const createEnvironmentHash = require('./utilities/createEnvironmentHash')
@@ -156,6 +157,13 @@ module.exports = (webpackEnv) => {
156
157
  }],
157
158
  }),
158
159
  new Dotenv(),
160
+ new WebpackShellPluginNext({
161
+ onBuildStart: {
162
+ scripts: ['ts-node scripts/generate-sitemap.ts'],
163
+ blocking: true,
164
+ parallel: false,
165
+ },
166
+ }),
159
167
  ],
160
168
  }
161
169
  }