@epublishing/grunt-epublishing 1.2.7 → 1.2.9
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/lib/webpack.config.js
CHANGED
|
@@ -102,12 +102,30 @@ function createWebpackConfig(config, options = {}) {
|
|
|
102
102
|
resolveAlias['jade-engine'] = path.resolve(paths.jade, paths.js_src || 'app/js', 'jade-engine.js');
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
// Read jade gem version from lib/jade/version.rb (Ruby is the source of truth)
|
|
106
|
+
let jadeVersion = 'unknown';
|
|
107
|
+
if (paths.jade && typeof paths.jade === 'string') {
|
|
108
|
+
try {
|
|
109
|
+
const versionRb = fs.readFileSync(
|
|
110
|
+
path.join(paths.jade, 'lib/jade/version.rb'),
|
|
111
|
+
'utf8',
|
|
112
|
+
);
|
|
113
|
+
const major = versionRb.match(/MAJOR\s*=\s*['"]?(\d+)['"]?/)?.[1];
|
|
114
|
+
const minor = versionRb.match(/MINOR\s*=\s*['"]?([\w.]+)['"]?/)?.[1];
|
|
115
|
+
const build = versionRb.match(/BUILD\s*=\s*['"]?([\w.]+)['"]?/)?.[1];
|
|
116
|
+
if (major && minor && build) jadeVersion = `${major}.${minor}.${build}`;
|
|
117
|
+
} catch {
|
|
118
|
+
// Fall through to 'unknown' — never fail the build over a version banner
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
105
122
|
// Build plugins array
|
|
106
123
|
const plugins = [
|
|
107
124
|
// Environment variables
|
|
108
125
|
new webpack.DefinePlugin({
|
|
109
126
|
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
|
|
110
127
|
'process.env.DEBUG': JSON.stringify(process.env.DEBUG || false),
|
|
128
|
+
__JADE_VERSION__: JSON.stringify(jadeVersion),
|
|
111
129
|
}),
|
|
112
130
|
|
|
113
131
|
// Limit moment.js locales to en
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epublishing/grunt-epublishing",
|
|
3
3
|
"description": "Modern front-end build tools for ePublishing Jade and client sites.",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.9",
|
|
5
5
|
"homepage": "https://www.epublishing.com",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"compression-webpack-plugin": "^11.1.0",
|
|
49
49
|
"css-loader": "^7.1.2",
|
|
50
50
|
"cssnano": "^7.0.0",
|
|
51
|
-
"eslint": "^9.15.0",
|
|
52
51
|
"handlebars": "^4.7.8",
|
|
53
52
|
"handlebars-loader": "^1.7.3",
|
|
54
53
|
"lodash": "^4.17.21",
|
|
@@ -84,6 +83,7 @@
|
|
|
84
83
|
],
|
|
85
84
|
"devDependencies": {
|
|
86
85
|
"@epublishing/eslint-config-epublishing": "^0.2.0",
|
|
86
|
+
"eslint": "^9.15.0",
|
|
87
87
|
"jest": "^29.7.0"
|
|
88
88
|
},
|
|
89
89
|
"scripts": {
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowJs": true,
|
|
4
|
+
"experimentalDecorators": true,
|
|
5
|
+
"allowSyntheticDefaultImports": true,
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
"downlevelIteration": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"lib": [
|
|
10
|
+
"dom",
|
|
11
|
+
"es6"
|
|
12
|
+
],
|
|
13
|
+
"module": "esnext",
|
|
14
|
+
"moduleResolution": "node",
|
|
15
|
+
"target": "es6",
|
|
16
|
+
"paths": {
|
|
17
|
+
"*": [
|
|
18
|
+
"app/js/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
Binary file
|
|
Binary file
|