1 | import fs from 'fs';
|
2 |
|
3 | const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
|
4 |
|
5 | const greenwoodThemeStarterPresentation = (options = {}) => [{
|
6 | type: 'context',
|
7 | name: `${packageJson.name}:context`,
|
8 | provider: (compilation) => {
|
9 | const templateLocation = options.__isDevelopment
|
10 | ? new URL('./layouts/', compilation.context.userWorkspace)
|
11 | : new URL('./dist/layouts/', import.meta.url);
|
12 |
|
13 | return {
|
14 | templates: [
|
15 | templateLocation
|
16 | ]
|
17 | };
|
18 | }
|
19 | }];
|
20 |
|
21 | export {
|
22 | greenwoodThemeStarterPresentation
|
23 | }; |
\ | No newline at end of file |