@modern-js/plugin-docsite 0.0.0-bundle-deps-202110123508

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +342 -0
  2. package/LICENSE +21 -0
  3. package/README.md +30 -0
  4. package/dist/js/modern/build-task.js +29 -0
  5. package/dist/js/modern/features/build.js +17 -0
  6. package/dist/js/modern/features/constant.js +7 -0
  7. package/dist/js/modern/features/dev.js +24 -0
  8. package/dist/js/modern/features/index.js +47 -0
  9. package/dist/js/modern/features/utils/chokidar.js +37 -0
  10. package/dist/js/modern/features/utils/generate-files.js +197 -0
  11. package/dist/js/modern/features/utils/valid.js +17 -0
  12. package/dist/js/modern/features/utils/webpack.js +63 -0
  13. package/dist/js/modern/index.js +49 -0
  14. package/dist/js/node/build-task.js +33 -0
  15. package/dist/js/node/features/build.js +31 -0
  16. package/dist/js/node/features/constant.js +21 -0
  17. package/dist/js/node/features/dev.js +39 -0
  18. package/dist/js/node/features/index.js +68 -0
  19. package/dist/js/node/features/utils/chokidar.js +55 -0
  20. package/dist/js/node/features/utils/generate-files.js +223 -0
  21. package/dist/js/node/features/utils/valid.js +36 -0
  22. package/dist/js/node/features/utils/webpack.js +80 -0
  23. package/dist/js/node/index.js +61 -0
  24. package/dist/js/static/DocsNav.jsx.tpl +42 -0
  25. package/dist/js/static/DocsRoutes.jsx.tpl +19 -0
  26. package/dist/js/static/DocsToc.jsx.tpl +20 -0
  27. package/dist/js/static/docs-entry.jsx.tpl +41 -0
  28. package/dist/js/static/docs-page.jsx.tpl +107 -0
  29. package/dist/js/static/docs.css +1008 -0
  30. package/dist/js/static/index.html.ejs +15 -0
  31. package/dist/js/static/stories-entry.ts.tpl +6 -0
  32. package/dist/js/static/storybook-config.js.tpl +32 -0
  33. package/dist/js/static/tsconfig.json +25 -0
  34. package/dist/types/build-task.d.ts +1 -0
  35. package/dist/types/features/build.d.ts +5 -0
  36. package/dist/types/features/constant.d.ts +3 -0
  37. package/dist/types/features/dev.d.ts +2 -0
  38. package/dist/types/features/index.d.ts +13 -0
  39. package/dist/types/features/utils/chokidar.d.ts +1 -0
  40. package/dist/types/features/utils/generate-files.d.ts +4 -0
  41. package/dist/types/features/utils/valid.d.ts +9 -0
  42. package/dist/types/features/utils/webpack.d.ts +3 -0
  43. package/dist/types/index.d.ts +15 -0
  44. package/modern.config.js +2 -0
  45. package/package.json +98 -0
  46. package/src/build-task.ts +31 -0
  47. package/src/features/build.ts +31 -0
  48. package/src/features/constant.ts +8 -0
  49. package/src/features/dev.ts +37 -0
  50. package/src/features/index.ts +68 -0
  51. package/src/features/utils/chokidar.ts +44 -0
  52. package/src/features/utils/generate-files.ts +238 -0
  53. package/src/features/utils/valid.ts +23 -0
  54. package/src/features/utils/webpack.ts +107 -0
  55. package/src/index.ts +42 -0
  56. package/src/type.d.ts +4 -0
  57. package/static/DocsNav.jsx.tpl +42 -0
  58. package/static/DocsRoutes.jsx.tpl +19 -0
  59. package/static/DocsToc.jsx.tpl +20 -0
  60. package/static/docs-entry.jsx.tpl +41 -0
  61. package/static/docs-page.jsx.tpl +107 -0
  62. package/static/docs.css +1008 -0
  63. package/static/index.html.ejs +15 -0
  64. package/static/stories-entry.ts.tpl +6 -0
  65. package/static/storybook-config.js.tpl +32 -0
  66. package/static/tsconfig.json +25 -0
  67. package/tsconfig.json +13 -0
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <!-- <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" /> -->
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
9
+ <title>Docs</title>
10
+ </head>
11
+ <body>
12
+ <noscript>You need to enable JavaScript to run this app.</noscript>
13
+ <div id="root"></div>
14
+ </body>
15
+ </html>
@@ -0,0 +1,6 @@
1
+ <% _.forEach(entries, function(entry) { %>
2
+ import * as <%= entry.name %> from '<%= entry.path %>';
3
+ <% }) %>
4
+
5
+ export { <%= entries.map(({ name }) => name).join(', ') %> };
6
+
@@ -0,0 +1,32 @@
1
+ module.exports = {
2
+ stories: [
3
+ '<%= rootDir %>/stories/**/*.{js,jsx,ts,tsx}',
4
+ '<%= rootDir %>/src/**/*.stories.{js,jsx,ts,tsx}',
5
+ ],
6
+ addons: [
7
+ '@storybook/addon-actions',
8
+ '@storybook/addon-links',
9
+ {
10
+ name: '@storybook/addon-storysource',
11
+ options: {
12
+ rule: {
13
+ test: {
14
+ or: [
15
+ {
16
+ test: [/.stories.{js,ts}x?$/],
17
+ },
18
+ {
19
+ include: '<%= rootDir %>/stories',
20
+ },
21
+ ],
22
+ },
23
+ },
24
+ loaderOptions: {
25
+ parser: 'typescript',
26
+ prettierConfig: { printWidth: 80, singleQuote: false },
27
+ },
28
+ },
29
+ },
30
+ '@storybook/addon-viewport',
31
+ ],
32
+ };
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "module": "esnext",
5
+ "baseUrl": "./",
6
+ "paths": {
7
+ "@*": ["./*"]
8
+ },
9
+ "lib": ["dom", "dom.iterable", "esnext"],
10
+ "allowJs": true,
11
+ "skipLibCheck": true,
12
+ "esModuleInterop": true,
13
+ "allowSyntheticDefaultImports": true,
14
+ "strict": true,
15
+ "noImplicitReturns": true,
16
+ "noUnusedLocals": true,
17
+ "noUnusedParameters": true,
18
+ "forceConsistentCasingInFileNames": true,
19
+ "moduleResolution": "node",
20
+ "resolveJsonModule": true,
21
+ "noEmit": true,
22
+ "jsx": "react"
23
+ },
24
+ "include": ["src"]
25
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "@modern-js/tsconfig/base",
3
+ "compilerOptions": {
4
+ "declaration": false,
5
+ "jsx": "preserve",
6
+ "baseUrl": "./",
7
+ "isolatedModules": true,
8
+ "paths": {
9
+ "@/*": ["./src/*"]
10
+ }
11
+ },
12
+ "include": ["src"]
13
+ }