@gasket/preset-nextjs 7.0.0-next.4 → 7.0.0-next.5
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/index.js +55 -3
- package/package.json +13 -12
package/lib/index.js
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import pluginExpress from '@gasket/plugin-express';
|
|
2
|
+
import pluginHttps from '@gasket/plugin-https';
|
|
3
|
+
import pluginNext from '@gasket/plugin-nextjs';
|
|
4
|
+
import pluginRedux from '@gasket/plugin-redux';
|
|
5
|
+
import pluginWebpack from '@gasket/plugin-webpack';
|
|
6
|
+
import pluginWinston from '@gasket/plugin-winston';
|
|
7
|
+
import { createRequire } from 'module';
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const { name, dependencies } = require('../package.json');
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name,
|
|
13
|
+
hooks: {
|
|
14
|
+
async presetPrompt(gasket, context, { prompt }) {
|
|
15
|
+
if (!('typescript' in context)) {
|
|
16
|
+
const { typescript } = await prompt([
|
|
17
|
+
{
|
|
18
|
+
name: 'typescript',
|
|
19
|
+
message: 'Do you want to use TypeScript?',
|
|
20
|
+
type: 'confirm',
|
|
21
|
+
default: false
|
|
22
|
+
}
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
Object.assign(context, { typescript });
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
async presetConfig(gasket, context) {
|
|
29
|
+
let testPlugin, typescriptPlugin;
|
|
30
|
+
|
|
31
|
+
if ('testPlugin' in context) {
|
|
32
|
+
testPlugin = await import(context.testPlugin);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (context.typescript) {
|
|
36
|
+
typescriptPlugin = await import('@gasket/plugin-typescript');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
plugins: [
|
|
41
|
+
pluginWebpack,
|
|
42
|
+
pluginExpress,
|
|
43
|
+
pluginHttps,
|
|
44
|
+
pluginNext,
|
|
45
|
+
pluginRedux,
|
|
46
|
+
pluginWinston,
|
|
47
|
+
typescriptPlugin ? typescriptPlugin.default || typescriptPlugin : null,
|
|
48
|
+
].filter(Boolean)
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
async create(gasket, { pkg }) {
|
|
52
|
+
pkg.add('dependencies', dependencies);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gasket/preset-nextjs",
|
|
3
|
-
"version": "7.0.0-next.
|
|
3
|
+
"version": "7.0.0-next.5",
|
|
4
4
|
"description": "Basic NextJS Framework",
|
|
5
|
-
"main": "lib",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"lib"
|
|
9
9
|
],
|
|
10
|
+
"type": "module",
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|
|
12
13
|
"url": "git+ssh://git@github.com/godaddy/gasket.git"
|
|
@@ -20,15 +21,15 @@
|
|
|
20
21
|
"url": "https://github.com/godaddy/gasket/issues"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@gasket/
|
|
24
|
-
"@gasket/
|
|
25
|
-
"@gasket/plugin-
|
|
26
|
-
"@gasket/plugin-
|
|
27
|
-
"@gasket/plugin-
|
|
28
|
-
"@gasket/plugin-
|
|
24
|
+
"@gasket/core": "^7.0.0-next.5",
|
|
25
|
+
"@gasket/engine": "^7.0.0-next.5",
|
|
26
|
+
"@gasket/plugin-express": "^7.0.0-next.5",
|
|
27
|
+
"@gasket/plugin-https": "^7.0.0-next.5",
|
|
28
|
+
"@gasket/plugin-nextjs": "^7.0.0-next.5",
|
|
29
|
+
"@gasket/plugin-redux": "^7.0.0-next.5",
|
|
30
|
+
"@gasket/plugin-webpack": "^7.0.0-next.5",
|
|
31
|
+
"@gasket/plugin-winston": "^7.0.0-next.5",
|
|
32
|
+
"@gasket/utils": "^7.0.0-next.5"
|
|
29
33
|
},
|
|
30
|
-
"
|
|
31
|
-
"@gasket/plugin-start": "^7.0.0-next.4"
|
|
32
|
-
},
|
|
33
|
-
"gitHead": "5a76c18917da4d37c2aa2f9b9a70e2514ee81398"
|
|
34
|
+
"gitHead": "b3b132ef284ac43616794283b969c23c45c0a90e"
|
|
34
35
|
}
|